Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

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

Open
tbehunin opened this issue Aug 8, 2018 · 0 comments
Open

Comments

@tbehunin
Copy link

tbehunin commented Aug 8, 2018

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants