Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during authorization: Redirect URI doesn’t match application #3

Open
richjava opened this issue Jul 6, 2020 · 3 comments
Open

Comments

@richjava
Copy link

richjava commented Jul 6, 2020

I have tried to follow this guide but when I click on the "Login with Netlify" button, I get the following error:

Error during authorization
Redirect URI doesn’t match application

The steps I have taken:

  • Forked this repo and created a Netlify app by Git, using the forked repo.
  • Renamed the Netlify app to "netlify-oath-example" (with mis-spelled "oauth" haha).
  • Created an Netlify OAuth application with a redirect URL of: https://netlify-oath-example.netlify.app/.netlify/functions/auth-callback.js
  • Set the Netlify environment variables NETLIFY_OAUTH_CLIENT_ID and NETLIFY_OAUTH_CLIENT_CLIENT with the values from the Netlify OAuth application.

Steps to reproduce:
Navigate to the following URL and click the "Login with Netlify button:
https://netlify-oath-example.netlify.app/

I'd really love to get this working and would appreciate any insights! :)

@bettse
Copy link

bettse commented Aug 18, 2020

I had the same error immediately after deploying and renaming my site. I fixed it by doing a redeploy so that the frontend code knew my site's new name.

@niwasmala
Copy link

I also had the same error after renaming my site. I fixed by changing the redirect URL without .js.

After changing the redirect URL from {url-of-my-site}/.netlify/functions/auth-callback.js to {url-of-my-site}/.netlify/functions/auth-callback, run trigger to deploy the apps again, it works

@theapplegates
Copy link

I also had the same error after renaming my site. I fixed by changing the redirect URL without .js.

After changing the redirect URL from {url-of-my-site}/.netlify/functions/auth-callback.js to {url-of-my-site}/.netlify/functions/auth-callback, run trigger to deploy the apps again, it works

This worked for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants