remix-auth
remix-auth copied to clipboard
Support customizing OAuth strategy callback url dynamically
This is similar to #35, but I make use of Netlify's preview deployments which can be accessed via several different endpoints. I don't actually know which endpoint a user has hit until the request is in flight. I'd like to be able to customize the callback url of the OAuth strategy based on the contents of the request (in this specific case I'm using Auth0). I can submit a pull request if desired.
Hi @gregbty! We are using vercel for deploy previews and we check for the environment variable VERCEL_URL
to mount the callback URL. I believe it is possible to do the same on Netlify using the env var DEPLOY_URL
.
https://docs.netlify.com/configure-builds/environment-variables/#deploy-urls-and-metadata