Add Email/Phone Verification
Last updated
Last updated
Most of the time, it's required for you to check if the user's identifier (their email or phone number) is valid. With Cotter, you can verify your users via email, SMS, or WhatsApp.
The verification will follow OAuth's PKCE flow which will open an in-app browser where your user can enter the OTP sent to their email/phone.
Pick a unique URL scheme for redirecting the user back to your app after the verification in the in-app browser is successful. For this example, we'll use myexample://auth_callback
.
Follow the guide under Sign in with Email/Phone – , then come back to this step.
Make sure you followed the guide for . Update your .
Verify the email/phone number first, then continue registering the user if verification is successful
This will work the following way:
The user will be asked to verify their email or phone number
If verification successful, we'll create a new User
Then, set up the current device as trusted.
If the user already exists but doesn't have a Trusted Device set up (for example from logging-in to your website):
The user will be asked to verify their email or phone number
Then if verification successful, set up the current device as trusted.