Using an IP as a OAuth Redirect URI

During development I just used localhost as my callback url which worked fine. Now I tried to create my application for production and entered the IP of the website from which the callback page will be served and it gives me the error “Missing or invalid top level domain”. I know what it means and what I could do to fix it but I don’t really want to buy a domain just for this since it will only be used locally by a few people.
Is there anything I can do so it accepts the IP?

Don’t believe so

A use of a domain can help prevent things being redirect to the wrong place. Also you just shouldn’t be using an IP address to server a website.

An IP address identifies a computer/server. From there Web Server software like Apache/Nginx determines what content to returned based on the incoming domain request.

Further more in order to use SSL you will need a domain. And whilst SSL is not required, it is advised to help users be happy about security and your handling of any credentials

Hey, I know that I shouldn’t use an IP to serve the website and always use a domain. But in this case the website will only be accessed by a handful of people on an isolated local network with restricted access to only a few people.

My answer to that then is the following:

I setup a subdomain on $dayjob’s DNS that points to a local server. Primarily for SSL but that’ll solve your problem

1 Like

The domain doesn’t need to resolve from the outside world. Using myserver.local (for example), which your LAN’s DNS server resolves for people within the network is perfectly fine.

1 Like

Oh, that’s good to know. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.