Email OTP Sign in/Sign up

Hello! I’d like to use email-based OTP for both sign-up and sign-in (without any email/password), but the current signIn method only returns the token and user object—it doesn’t actually return a session cookie. I discovered that calling verifyEmail() with (overrideDefaultEmailVerification: true) will automatically sign the user in, but it only works for existing accounts and doesn’t create a new user. Is there any way to handle both cases? I checked the documentation but couldn’t find a way to exchange the token i get from the signIn method for a session cookie directly. Thank you for your help! Edit: It was user error, i had cookie management issues.
1 Reply
zgy
zgy4mo ago
I have a similar question. I am also using the email otp but the signInEmailOTP does not return cookie headers I need to set in Remix. How did you solve it?

Did you find this page helpful?