Skip to main content

Start an OTP login

Send a one-time password to a phone number:
If your application is configured for email OTP, you can use email_address instead of phone_number to send the code via email:
The SDK sends the OTP and persists the verification token (returned in the X-Verification-Token response header) along with a PKCE code verifier in localStorage. The user can then enter the code to complete the login.

Check the OTP code

Verify the code entered by the user:
On success, the API sets a refresh cookie on the client.

Retry sending the OTP

If the user didn’t receive the code, retry sending it:
Replace src/App.jsx with:
src/App.jsx