-
Notifications
You must be signed in to change notification settings - Fork 825
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
Add usernameAttributes (e.g. "email", "phone") to aws-exports.js #3550
Comments
Is it possible to use https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeUserPool.html to do this work? |
Is there a way to search for this link? At some point links from docs.amplify.aws broke and has not been fixed... |
Related, there may be other fields configured via |
Just some thoughts: briefly look into this with my limit knowledge about
My concern of using
|
Another example that came up in today's "Amplify with Friends" was with custom sign-up attributes, like Preferred Username. When these are configured, the UI has no idea about it. So it means the Authenticator doesn't work out-of-the-box – customers have to immediately customize form fields & settings even though they already did that. |
The UI team is mocking out the changes required in the exports file. For example, something like this would be ideal:
|
As @swaminator mentioned, we discovered an example of additional information that the backend gets configured with that the UI could use to enhance the experience: To keep a running tally:
|
Can this information be instead fetched from the Cognito control-plane instead of relying on the aws_exports.js file for the source of truth for these resource configurations? |
@kaustavghosh06 We researched that last year, but IIRC ran into two issues:
I'm open to suggestions on the best way to make the Authenticator zero-config with their configured backend 🙏 |
Closing as this has since been added to the generated
|
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Customers run
amplify add auth
(aws-amplify/amplify-js#3451) withemail
instead ofusername
, then use Amplify's UI components (e.g.withAuthenticator(App)
) in their app, but the UI doesn't reflect their configuration:They have to carefully read the docs to learn they need to use
usernameAttributes
to get the two in sync:(This also caught me off-guard the first time I've used Amplify!)
Describe the solution you'd like
aws-exports.js
contains the auth value so that the UI can automatically reflect it.Describe alternatives you've considered
Change the upcoming UI components to not have a default at all (e.g.
username
) and require configuration to show it at all:The text was updated successfully, but these errors were encountered: