Hi, how can I achieve Mail verification of a Mail+...
# ask-a-descoper
b
Hi, how can I achieve Mail verification of a Mail+Password Sign Up? We have the Sign Up flow in place but couldn't find a way to gate the auth behind mail verification at sign up..
g
hey 🙂 you can design the flow so that the user first enters their email, you do a verification (using OTP/ML/EL - your choice), and after that they fill in the password (and use the update password action step to add it to the user)
s
Something like this
g
was just about to attach this flow for you but @salmon-night-88354 the mighty beat me to it 💪🏼
🤣 1
b
Thank you for the help guys. @salmon-night-88354 i might not understand something, but as i can tell the flow is problematic: After entering the password, before verifying the mail, the password is being updated in descope which happens automatically in "Sign Up / Password". Therefore, (i validated that): • A user can enter an email+password • Being navigated to the OTP page • Refresh the page (effectively opting out of OTP verification) • Log in using the email+password (which is possible due to what stated previuosly) Alternatively, I tried to come up with a flow according to @gifted-florist-65280 suggestion: • First screen only an "Email" input and a Button • On Submit perform OTP verification • On Authenticate navigate to a screen with password • Perform Sign Up / Password • End This seemed promising to me, but all of the verification methods (OTP, E/M Link) are failing with an error "Failed to verify token". Specifically for magic link, an error is in the console: "magic link token not verified Failed verifying magic link Error".
s
@brave-flower-58422 This one should do the trick.
b
@salmon-night-88354 amazing, thank you!