remix-auth icon indicating copy to clipboard operation
remix-auth copied to clipboard

Support customizing OAuth strategy callback url dynamically

Open gregbty opened this issue 2 years ago • 1 comments

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.

gregbty avatar Nov 24 '21 03:11 gregbty

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

andreisena avatar Oct 01 '22 03:10 andreisena