-
Notifications
You must be signed in to change notification settings - Fork 249
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): enables custom auth flows #1444
feat(auth): enables custom auth flows #1444
Conversation
packages/auth/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart
Outdated
Show resolved
Hide resolved
...oid/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterSignInRequest.kt
Show resolved
Hide resolved
packages/auth/amplify_auth_cognito/example/integration_test/sign_in_sign_out_test.dart
Outdated
Show resolved
Hide resolved
packages/auth/amplify_auth_cognito_ios/ios/Classes/FlutterSignInRequest.swift
Show resolved
Hide resolved
0b23781
to
bfdc7c2
Compare
12caeab
to
ea5367f
Compare
@@ -126,7 +126,7 @@ class AuthenticatorInputLocalizationsEn | |||
} | |||
|
|||
@override | |||
String passwordRequirementsAtLeast(int numCharacters, String characterType) { | |||
String passwordRequirementsAtLeast(num numCharacters, String characterType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not always an int? I assume if it is not an int it is still a whole number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed on one of my initial commits, and I cannot recall why. I'm changing it back. If there is an issue with it, it's immaterial to this PR.
packages/auth/amplify_auth_cognito/example/integration_test/utils/setup_utils.dart
Outdated
Show resolved
Hide resolved
packages/auth/amplify_auth_cognito/lib/method_channel_auth_cognito.dart
Outdated
Show resolved
Hide resolved
...ges/amplify_authenticator/example/lib/customization/authenticator_with_custom_auth_flow.dart
Show resolved
Hide resolved
packages/amplify_authenticator/example/lib/resolvers/localized_input_resolver.dart
Show resolved
Hide resolved
packages/amplify_authenticator/example/lib/resolvers/localized_title_resolver.dart
Show resolved
Hide resolved
packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart
Outdated
Show resolved
Hide resolved
packages/amplify_authenticator/lib/src/blocs/auth/auth_bloc.dart
Outdated
Show resolved
Hide resolved
packages/amplify_authenticator/lib/src/state/authenticator_state.dart
Outdated
Show resolved
Hide resolved
packages/amplify_authenticator/lib/src/widgets/form_fields/confirm_sign_in_form_field.dart
Outdated
Show resolved
Hide resolved
packages/auth/amplify_auth_cognito/example/integration_test/custom_auth_passwordless_test.dart
Outdated
Show resolved
Hide resolved
packages/amplify_authenticator/example/lib/customization/authenticator_with_custom_layout.dart
Outdated
Show resolved
Hide resolved
@@ -75,3 +75,11 @@ class VerifyUserFlow extends UnauthenticatedState { | |||
const VerifyUserFlow({required this.unverifiedAttributeKeys}) | |||
: super(step: AuthenticatorStep.verifyUser); | |||
} | |||
|
|||
class ConfirmSignInCustom extends UnauthenticatedState { | |||
final Map<dynamic, dynamic> publicParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still shows dynamic, dynamic for me
packages/amplify_authenticator/lib/src/state/authenticator_state.dart
Outdated
Show resolved
Hide resolved
@@ -44,6 +44,14 @@ class AuthenticatorState extends ChangeNotifier { | |||
_resetAttributes(); | |||
} | |||
}); | |||
|
|||
// Always listen for ConfirmSignInCustom events (not distinct) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't make a difference. distinct
just means that two identical events will not be emitted back-to-back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I thought that this might be needed for multiple Custom Challenges.
/// Uses [ButtonResolverKey.confirm] for localization | ||
/// {@endtemplate} | ||
class ConfirmSignInCustomButton extends ConfirmSignInMFAButton { | ||
/// {@macro amplify_authenticator.confirm_sign_custom_button} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template string does not match above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Issue #, if available:
#410
Description of changes:
Enables custom authentication flows.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.