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

[Authenticator] Allow additional customization of prebuilt forms (custom FormFields, Buttons, etc.) #2509

Open
andr3i4o opened this issue Dec 22, 2022 · 4 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.

Comments

@andr3i4o
Copy link

  1. Currently, SignUpForm.custom allows only the predefined SignUpFormField.custom field, which is a text field only.
  2. Actions on SignUpForm.custom are static constants and not parameters.

Case scenario:

Before signing up, we need a checkbox for agreeing to the terms and conditions.
So either SignUpFormField.custom should be of a dynamic type, or the actions should be a parameter, so we could inherit the SignUpButton and validate the checkbox before calling state.signUp().

@Jordan-Nelson Jordan-Nelson added pending-triage This issue is in the backlog of issues to triage Authenticator Issues related to the Authenticator UI Component labels Dec 22, 2022
@Jordan-Nelson
Copy link
Member

Jordan-Nelson commented Dec 22, 2022

Hello @andr3i4o - You can find an example of how to add a Terms and Condition check box here.

This example will set a custom user attribute in cognito that stores the value for their selection (true or false).

This example also customizes a few other screens.

@Jordan-Nelson Jordan-Nelson changed the title Flutter Authenticator Sugnup custom fields and save button Flutter Authenticator Signup custom fields and save button Dec 22, 2022
@Jordan-Nelson Jordan-Nelson added feature-request A request for a new feature or an enhancement to an existing API or category. and removed pending-triage This issue is in the backlog of issues to triage labels Dec 22, 2022
@Jordan-Nelson
Copy link
Member

I've marked this as a feature request. It should be possible to achieve your use case with the 'authenticatorBuilder' api, but I think there are certain use cases where an alternate API as you are suggesting could be easier to use.

@andr3i4o
Copy link
Author

Great, that's excatly the needed case scenario, just it's not described in any documentation I've tried to find... Thanks!
I still think that this would be a usefull feature in order to simplify the developer experience.

@Jordan-Nelson
Copy link
Member

Jordan-Nelson commented Dec 22, 2022

@andr3i4o - Ideally common use cases would be easy to implement (via an API like SignUpForm.custom()) while more advanced use cases could be achieved with a bit more work (via an API like authenticatorBuilder). I agree that the developer experience could be improved for this use case since it is fairly common.

I am going to update this issue title/description to reflect a request for API / developer experience improvements for common use cases such as this.

There is an example in the docs for the authenticatorBuilder API, but the example that I linked to above is much more closely aligned to this use case.

@Jordan-Nelson Jordan-Nelson changed the title Flutter Authenticator Signup custom fields and save button [Authenticator] Allow additional customization of prebuilt forms (custom FormFields, Buttons, etc.) Dec 22, 2022
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.
Projects
None yet
Development

No branches or pull requests

2 participants