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

localhost and 127.0.0.1 confusion #25

Open
joe-fenton opened this issue Aug 14, 2018 · 0 comments
Open

localhost and 127.0.0.1 confusion #25

joe-fenton opened this issue Aug 14, 2018 · 0 comments

Comments

@joe-fenton
Copy link

I've been using this component and following the medium article https://medium.com/@robince885/how-to-do-twitter-authentication-with-react-and-restful-api-e525f30c62bb to get it all to work.
It has been almost working for a day, and I was stuck where the pop-up window to Authorize the app would not go away and would instead reload the sign in page within the popup window.
I already had the Facebook and Google sign-ins working following similar instructions, and I was working from localhost:3000 as are the examples on Medium. However, Twitter does not allow you to set a callback url that has localhost in it, so I tried 127.0.0.1:3000.
This had merely resulted in the the above behavior of the sign-in screen being loaded into the pop up window. I was unaware, for quite some time trying to debug and research the problem, that I had to start the whole process from 127.0.0.1:3000, and not localhost:3000. After doing this, the sign-in worked!
It wasn't so obvious to me and since the other social media buttons were working from the localhost address, I assumed that the 127.0.0.1 callback would just be interpreted the same as localhost. Is there a way that can be implemented to prevent future confusion for others?

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

1 participant