aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 243 forks source link

Customize the UI for the username type selection (instead of the ToggleButton) #2617

Open mithunkavullakandiyil opened 2 years ago

mithunkavullakandiyil commented 2 years ago

On which framework/platform would you like to see this feature implemented?

Flutter

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

Looking for customisation option for usernameType selection (instead of the ToggleButton) while using username field when multiple username attributes present in Auth config.

While using the custom forms for Sign Up/Sign In, when we add the username input field, a toggle button to select between Email or Phone Number is presented. No customisation option for the toggle button.

In my use case, I would like to have links such as "Sign In/Up with Email/Phone Number" to toggle between Email or phone number.

Another point I would like to highlight here is that, when multiple username attributes available, and when email is selected, a username field for email and a phone number field is displayed and when phone number is selected, only phone number field is selected. This behaviour is OK. But, when I use custom forms, to correct the order of the fields, I cannot get similar behaviour.

Please describe a solution you'd like.

A simple way to update the selected username type is preferred. This could also be helpful to set default username type before showing the authenticator forms.

We love contributors! Is this something you'd be interested in working on?

abdallahshaban557 commented 2 years ago

Hi @mithunkavullakandiyil - Thank you for raising this issue! I wanted to ask you, what is the use case that you have for using email or phone number as your username? We are trying to understand how are developers using this authentication method, to enable customizations correctly for it.

mithunkavullakandiyil commented 2 years ago

Hi @mithunkavullakandiyil - Thank you for raising this issue! I wanted to ask you, what is the use case that you have for using email or phone number as your username? We are trying to understand how are developers using this authentication method, to enable customizations correctly for it.

We want to allow our app users to decide whether they want to use email or phone number as their username while registering. We have also seen apps which already have such functionalities. I am aware of the current limitation of Amplify 2FA which can be sent to SMS (or Authenticator App), but email. In that case, while email based registration, phone number is still required. For our app, mobile number is always required as there will be transactional SMSs to be sent to the user's mobile number. But we would like to give the option to choose whether email or phone number as the user name.

I am not sure if I have answered your question well. If not, please let me know.

abdallahshaban557 commented 2 years ago

@mithunkavullakandiyil - you absolutely did! Thank you for the quick response. We will provide an update on this issue when we have an idea on the timelines.

reesscot commented 1 year ago

Transferred to the Amplify Flutter repo