MomenSherif / react-oauth

Google OAuth2 using the new Google Identity Services SDK for React 🚀
https://www.npmjs.com/package/@react-oauth/google
MIT License
1.13k stars 141 forks source link

Redirect URI for vercel preview links #330

Closed WebDev-Akhil closed 9 months ago

WebDev-Akhil commented 9 months ago

Upon successful authentication, Google redirects the user to the URL which we set in the "Redirection URI" field in the Google Console.

As the URLs change for every vercel preview deployment, setting a static URL in the "Redirection URI" results in a mismatch. So how to handle this?

MomenSherif commented 9 months ago

As I remember Vercel adds env variable for the deployment link, you can check and use it