Feature Request: Export UnmetPasswordRequirements
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
- [X] Authenticator
- [ ] DataStore
- [ ] Notifications (Push)
- [ ] Storage
Steps to Reproduce
Try to override UnmetPasswordRequirements in passwordRequires method
Screenshots
No response
Platforms
- [X] iOS
- [X] Android
- [X] Web
- [X] macOS
- [X] Windows
- [X] Linux
Flutter Version
3.24.1
Amplify Flutter Version
2.4.1
Deployment Method
Amplify Gen 2
Schema
No response
This PR fixe this issue: https://github.com/aws-amplify/amplify-flutter/pull/5403
Hi @JoseAlba, thanks for taking the time to open this issue and PR.
Please address the feedback on the PR and we will get this merged
Thank you Elijah, I addressed your comment
Hi @JoseAlba, I created PR #5437 to address some additional linter errors. This will also simply the CI permission process that was causing checks to fail on your PR. I will let you know once it get's merged!
LGTM
@JoseAlba We just merged the PR, so the changes will be available with our next release. We will post an update here when we deploy the release!
Sorry we lost track of this issue. Closing as the fix was released half a year ago!
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.