Skip to content

localhost and 127.0.0.1 confusion #25

@joe-fenton

Description

@joe-fenton

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions