redirect_uri_mismatch error in production #509
-
Thanks for giscus, it's really an amazing project! I have an issue when running giscus (or my own fork) from a development server or one of the temporary domains associated with a Vercel deployment. I get a redirect_uri_mismatch error because the callback URL I've entered in the GitHub settings of my app doesn't match the So I think I understand why this happens, but I'm wondering if there is an elegant way of avoiding this behaviour. Any thoughts would be really helpful! Thanks again! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can specify multiple callback URLs for your app in this section: See the "Add Callback URL" button on the top right. You can then specify your production and development endpoints. It doesn't support wildcards, so you'll have to add the URL for every deploy preview provided by Vercel. I think there's a limit on the number of URLs you can add, so remove any deploy previews that are no longer used.
This is the only way that I'm aware of. It's a bit of a hassle, but it's there for security reasons, otherwise any arbitrary URL can get the token once the user has signed in through our app. |
Beta Was this translation helpful? Give feedback.
You can specify multiple callback URLs for your app in this section:
See the "Add Callback URL" button on the top right.
You can then specify your production and development endpoints. It doesn't support wildcards, so you'll have to add the URL for every deploy preview provided by Vercel. I think there's a limit on the number of URLs you can add, so remove any deploy previews that are no longer used.
This is the only way that I'm aware of. It's a bit of a hassle, but it's there for security reasons, otherwise any arbitrary URL can get the token once the user has signed in through our app.