How to enable username login and how to check whether username avaliable or not?
Note: If your question is regarding the AWS Amplify Console service, please log it in the AWS Amplify Console repository
Which Category is your question related to?
Amplify CLI Version
You can use amplify -v to check the amplify cli version on your system
What AWS Services are you utilizing?
Provide additional details e.g. code snippets. Be sure to remove any sensitive data.
Hey @AsitDixit :wave: you can use username as a login mechanism by selecting username when creating the auth resource with amplify add auth (https://docs.amplify.aws/cli/auth/overview/)
Can you clarify the second question? Are you looking to validate whether username was selected when you previously created an auth resource?
@josefaidt Yes I want to run query whether user name is available or not and that username you said is immutable basically I am asking about preferred_username
Hey @AsitDixit apologies for the delay here, are you looking to have unique preferred_username attributes? This approach may create an additional attack vector for your app. We can also leverage a pre-signup trigger that uses the AWS SDK to call Cognito and see if this preferred_username is available
- https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentity.html
- https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/Welcome.html
Hey @AsitDixit just wanted to follow-up on this one and see if you're still experiencing this issue?
Solved