Skip to content
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

Is it possible to check if the user/email already exists #73

Open
mschewe opened this issue Jan 6, 2020 · 0 comments
Open

Is it possible to check if the user/email already exists #73

mschewe opened this issue Jan 6, 2020 · 0 comments

Comments

@mschewe
Copy link

mschewe commented Jan 6, 2020

I would like to have a two step sign-up. First the user should enter it's E-Mail. If the E-Mail is already known, the user should be asked for his password. If the user is unknown, it should show the password and password_confirmation field. Is this possible?

The only way I found is to use a wrong password and then catch the error:

userPool.signUp('email@example.com', 'veryunlikelypassword');
-----
ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: CognitoClientException{statusCode: 400, code: UsernameExistsException, name: UsernameExistsException, message: An account with the given email already exists.

But this doesn't seem right. Is there an alternative?

EDIT: Stupid from my side. That would register the user with that password 🤦‍♂️

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

No branches or pull requests

1 participant