amazon-archives/awsmobile-cli

Amplify Auth.signup() fails with default awsmobile user-signin enable

tbehunin opened this issue · 0 comments

After successfully creating a cognito pool via the following commands:
awsmobile user-signin enable --prompt
(specify Advanced > Cognito User Pools, login via Email, etc)
awsmobile push

... and integrated Amplify, v1.0.5, when I make a call to create an account:

Auth.signUp({ username: email, password, attributes: { email } })

I get the error: Username cannot be of email format, since user pool is configured for email alias.

This error basically implies the username can't be an email address - regardless what you specify/configure via awsmobile. The only way around this that I've found was to specify a username . that's not an email format (e.g. replacing the ampersand):

Auth.signUp({ username: email.replace('@', '_'), password, attributes: { email } })

(☝️ not ideal)

If I go to the cognito pool dashboard, I see the following configuration (not editable):
image

I'm thinking that's a bug, right? Since I specified email as my way to login via awsmobile cli, shouldn't the email radio button be selected?