Passwordless Sign-In method with email + OTP response is inconsistent for different emails #14195
Open
3 tasks done
Labels
Auth
Related to Auth components/category
pending-community-response
Issue is pending a response from the author or community.
question
General question
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify Gen 2
Environment information
Describe the bug
I am using Amplify Auth for Passworldless sign in with Email and OTP. My user pool does not have any users and then I tried sign in with different emails, and I got inconsistent responses. For few emails it sent back
{ "isSignedIn": false, "nextStep": { "signInStep": "CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION", "availableChallenges": [ "PASSWORD_SRP", "PASSWORD", "WEB_AUTHN" ] } }
But strangely, I tried one email of mine and this email is not present in the user pool but, it gave back this response
{ "isSignedIn": false, "nextStep": { "signInStep": "CONFIRM_SIGN_IN_WITH_EMAIL_CODE", "codeDeliveryDetails": { "deliveryMedium": "EMAIL", "destination": "s***@o***" } } }
This response comes when an OTP has been sent to the email, but this email did not receive any OTP on trying multiple times. Why this response is coming for an email which is not registered in this user pool. It should have given an error for non existent users. Also, for other emails not present in the user pool, it is giving the first response above.
Why is this inconsistent behavior present? I am not going to use it for production as of now.
Expected behavior
In case of email not present in the user pool, the Sign In method should have thrown an error.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: