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

Feature Request: Export UnmetPasswordRequirements #5435

Open
7 of 14 tasks
JoseAlba opened this issue Sep 10, 2024 · 6 comments
Open
7 of 14 tasks

Feature Request: Export UnmetPasswordRequirements #5435

JoseAlba opened this issue Sep 10, 2024 · 6 comments
Labels
Authenticator Issues related to the Authenticator UI Component feature-request A request for a new feature or an enhancement to an existing API or category. pending-release Issues that have been addressed in main but have not been released

Comments

@JoseAlba
Copy link
Contributor

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

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Sep 10, 2024
@JoseAlba
Copy link
Contributor Author

This PR fixe this issue: #5403

@Equartey Equartey changed the title Export UnmetPasswordRequirements Feature Request: Export UnmetPasswordRequirements Sep 10, 2024
@Equartey Equartey added feature-request A request for a new feature or an enhancement to an existing API or category. Authenticator Issues related to the Authenticator UI Component labels Sep 10, 2024
@github-actions github-actions bot removed the pending-triage This issue is in the backlog of issues to triage label Sep 10, 2024
@Equartey
Copy link
Member

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

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Sep 10, 2024
@JoseAlba
Copy link
Contributor Author

Thank you Elijah, I addressed your comment

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Sep 10, 2024
@tyllark
Copy link
Member

tyllark commented Sep 11, 2024

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!

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Sep 11, 2024
@JoseAlba
Copy link
Contributor Author

LGTM

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Sep 12, 2024
@tyllark
Copy link
Member

tyllark commented Sep 16, 2024

@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!

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Sep 16, 2024
@Equartey Equartey added the pending-release Issues that have been addressed in main but have not been released label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator Issues related to the Authenticator UI Component feature-request A request for a new feature or an enhancement to an existing API or category. pending-release Issues that have been addressed in main but have not been released
Projects
None yet
Development

No branches or pull requests

3 participants