Description
Description
Need to export UnmetPasswordRequirements as developers can not currently override class: InputResolver method: passwordRequires.
Amplify_authenticator is exporting auth_strings_resolver and auth_strings_resolver exports input_resolver. Input resolver has a few methods that are meant to be exposed to the public to be overriden.
file:amplify_authenticator.dart
export 'src/l10n/auth_strings_resolver.dart' hide ButtonResolverKeyType;
file: auth_string_resolver.dart
export 'input_resolver.dart';
In method passwordRequires one of the parameters is of type UnmetPasswordRequirements
. Previously the API was called PasswordProtectionSettings
which was exported for developer usage.
String passwordRequires(
BuildContext context,
UnmetPasswordRequirements requirements,
)
The solution here is exporting the UnmetPasswordRequirements so that developers can override the InputResolver class. If Amplify doesn't want to continue extending this API, I recommend using the dart keyword sealed so that the class can't be extended.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Categories
- Analytics
- API (REST)
- API (GraphQL)
- Auth
- Authenticator
- DataStore
- Notifications (Push)
- Storage
Steps to Reproduce
Try to override UnmetPasswordRequirements
in passwordRequires
method
Screenshots
No response
Platforms
- iOS
- Android
- Web
- macOS
- Windows
- Linux
Flutter Version
3.24.1
Amplify Flutter Version
2.4.1
Deployment Method
Amplify Gen 2
Schema
No response