Convex Auth OTP requires redirect url or SITE_URL
When attempting to use the OTP method alone, SITE_URL is required (unless you provide a redirect url).
This line in particular leads to a thrown error: https://github.com/get-convex/convex-auth/blob/90318a4d346523035ed9c75e70cd99653a5bede9/src/server/implementation.ts#L1744
I'm not yet processing links inbound to my react native app, so I don't want to use magic links and don't have a redirect url or site url to use, hence my interest in OTP-only.
7 Replies
For now I've set a dummy SITE_URL, so not blocked.
(And I have Convex Auth up and running in place of Clerk in React Native 🎉 )
Yeah, good catch. Unfortunate result of reusing the email provider type for both magic links and OTPs.
GitHub
OTPs should not require SITE_URL · Issue #40 · get-convex/convex-au...
https://discord.com/channels/1019350475847499849/1263635045483155556 It's because we always generate the URL that includes the code param, even in the case of OTPs. This comes from the shape of...
Ah, that makes sense
Hi @erquhart, may I ask where did you set the SITE_URL to work around this issue?
It's an environment variable, set it in the Convex dashboard
Thanks!