is SITE_URL with multiple domains supported for OTPs?
I have a turborepo with two apps hosted on different domains, both using Resend magic links. In production, I need to send a different SITE_URL for each app while using the same branch. I'm trying to use redirectTo, but it doesn't seem to be accessible on the Convex side. How can I handle this?
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
It sounds like you have multiple sites sharing one backend, no problem. You can't set the SITE_URL environment variable to two different values in the same deployment, so it depends on what you're using SITE_URL for (it sounds like you can't really use SITE_URL for anything, since you have multiple site urls) SITE_URL is used for a few different things, is this a question about Convex Auth?
I'm trying to use redirectTo,redirectTo is a property of the argument to signIn(), that sounds like a good place to set where to redirect to, ok makes sense
but it doesn't seem to be accessible on the Convex side.what does this mean, what do you want to use this for?
Did you see https://labs.convex.dev/auth/api_reference/server#callbacksredirect where you specify which URLs are allowed as redirects?
server - Convex Auth
Authentication library for your Convex backend
