Incorrect Magic Link Base URL in Vercel
Magic Link URL always sends the deployment base url instead of the custom domain url in Vercel. I am using authClient for this.
This does not happen with sending the reset password link.


2 Replies
In the source code for magic-link/index.ts:
When constructing the magic link URL, it's using ctx.context.baseURL which appears to be using the deployment URL instead of respecting the domain from the incoming request. I don't know why it's doing this
Have tou set a base url
Is this vercel preview you are referring to?
*in. Env?