Customization for individual fields in `signUpFields` prop
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently, I am using withAuthentificator
component for the Sign In and Sign Up process. During Sign Up process, I want to ask the user for a custom attribute which I added to the signUpFields
prop like so:
{
label: 'Account Type (contractor | client)',
key: 'custom:userType',
required: true,
displayOrder: 6,
type: 'string',
}
As you can see, I would like to offer the user two options for this field: contractor
or client
. With the current implementation, the user is allowed to type anything as there is no validation that happens whatsoever.
Describe the solution you’d like A great solution to this would be the ability to turn this input into a dropdown so users can only select what is available or a less nice way of doing this would be to add a regex validation to the field. This won’t be the desired solution, but at least would make the sign up process a little bit more accurate.
Describe alternatives you’ve considered I am also aware there is a way to customize the signup screen and to implement custom inputs as described in the documentation here. But, I think there is a better way to achieve this without going through a whole customization process.
Additional context
I understand I might be a little greedy and lazy 😁 and want withAuthentificator
to offer more options, but I think it’s a good feature to consider or at least to start a conversation around. Thanks for all the work you guys do, really appreciate it! 😊
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
@andrei-zgirvaci You are correct that the new
Authenticator
is only available for React and not React Native. We are currently working to bridge that gap by adding a new React NativeAuthenticator
that will have a similar API to what we have for React, allowing for greater customization. Will reopen this ticket in the meantimeThat’s my mistake! Re-opening & tagging as React Native.
The API for React Native should look pretty similar.
@ashika01 @calebpollman Should we keep this issue in the UI repo or migrate it to JS for the next
aws-amplify-react-native
release?