Is it possible to test out Oauth Login Authentication (Facebook, Twitter, Google) without a domain and hosting?

StackOverflow https://stackoverflow.com/questions/7200046

Is there a way without actual domain name and a hosting ?

Can we use localhost in some way ?

I am using Python and Django !

有帮助吗?

解决方案 3

This is what I have found out :

It can be done, simply by using 127.0.0.1 in the callback/redirect uri

It worked and I am able to test my app on localhost.

其他提示

Yes, just use url shorteners to create short urls kind of "localhost:port" and then register that shortened url as the callback url for your app.

FYI: some url shorteners don't allow you to shorten "localhost:port" urls. I suggest you to use goo.gl

I have a domain name and hosting but when I need to try the Oauth Authentication, what I do is:

Modify the hosts file to map a random domain to your local ip.

For example in windows, I modify the file 'C:\WINDOWS\system32\drivers\etc\hosts' adding the following line:

127.0.0.1    www.yourdomain.com

BTW, this domain doesn't need to be registered

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top