Can I test Oauth authentication authentication (Facebook, Twitter, Google) without domain and hosting?

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

Is it possible to use localhost in some way?

I am using Python and Django!

+4
source share
3 answers

Here is what I learned:

This can be done simply using 127.0.0.1 in uri callback / redirect

This worked and I can test my application on a local hosting.

+2
source

Yes, just use URL shortcuts to create short URLs like "localhost: port" and then register that shortened URL as the callback URL for your application.

FYI: Some URL shorteners do not allow you to shorten the "localhost: port" URL. I suggest you use goo.gl

+2
source

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

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

For example, on Windows, I modify the file 'C: \ WINDOWS \ system32 \ drivers \ etc \ hosts' by adding the following line:

127.0.0.1 www.yourdomain.com 

BTW, this domain does not need to be registered

+2
source

Source: https://habr.com/ru/post/1369100/


All Articles