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

Redirecting to localhost after login. #25

Open
errorr404 opened this issue Jul 16, 2019 · 3 comments
Open

Redirecting to localhost after login. #25

errorr404 opened this issue Jul 16, 2019 · 3 comments

Comments

@errorr404
Copy link
Contributor

After login it is redirecting to localhost:8080, not to the base URL.

@DivyanshBatham
Copy link
Contributor

Even after adding new Client Id and Secret with the new callback - https://cb-imgur.netlify.com/auth_cb

There seems to be some kind of error:
image

Back to our site is taking back to https://cb-imgur.netlify.com

@DivyanshBatham
Copy link
Contributor

Got it, the issue is that:
Whenever the user visits an internal links (which are handled by react router) directly i.e. fresh load, netlify tries to find a file named like that.

For example:
https://cb-imgur.netlify.com <- This will send back the index.html
https://cb-imgur.netlify.com/something <- This will send back a 404, since there is no file named something.html on the server.
But if you go to the first link, and then navigate to something, then that will get handled by react-router.

@DivyanshBatham
Copy link
Contributor

Fix: Add a netlify.toml file with the following snippet of code:

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Ref. - https://www.netlify.com/docs/netlify-toml-reference/

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

2 participants