Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(auth): runtime authFlow attribute #1687

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

haverchuck
Copy link
Member

Issue
#334

Description of changes:
Adds runtime authFlow type. Requires bumping amplify-android to 1.34.0 and amplify-ios to 1.25.0.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dnys1
dnys1 previously approved these changes Jun 4, 2022
Copy link
Contributor

@dnys1 dnys1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -17,10 +17,13 @@ import 'package:amplify_core/amplify_core.dart';

class CognitoSignInOptions extends SignInOptions {
Map<String, String>? clientMetadata;
CognitoSignInOptions({this.clientMetadata}) : super();
final AuthenticationFlowType? authFlowType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just authFlow. The type suffix originates in the SDK where they add Type to the end of all types for some reason

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API parameter authFlowType is what is used by the native libraries, so I decided to stay consistent with them. In terms of the enum AuthenticationFlowType, I used the existing one we are getting from the config. I realize it's a little odd to have a mismatch between the type name and the API parameter, but I didn't want to deviate from the native APIs or change/duplicate an existing enum.

@haverchuck haverchuck marked this pull request as ready for review July 11, 2022 19:39
@haverchuck haverchuck requested a review from a team as a code owner July 11, 2022 19:39
dnys1 pushed a commit to dnys1/amplify-flutter that referenced this pull request Jul 11, 2022
@haverchuck haverchuck merged commit bd81bdb into aws-amplify:main Jul 11, 2022
dnys1 pushed a commit that referenced this pull request Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants