I want to implement an OAuth2 login on my small website, that's running on an RPI 3b. Codewise, everything seems to be working. The project itself is made using Spring Boot and the verification process is successful when connecting to localhost or the respective IP address.
Since I don't want to display my IP address in the browser when accessing the site, I bought a domain (domain.com) on Namecheap. I did set up the URL redirecting to the static IP of my RPI and am hosting the website on in.
My problem is as follows:
Since I don't want the URL to be a simple redirect to my IP, negating its purpose, I chose for it to be masked.
But when using the masked URL discord.com is refusing my connection.
Is the approach of using a masked URL wrong by itself or did I miss a setting or similar of some sort?
CodePudding user response:
You don't want a redirect, nor do you want a mask. You want the assign the domain name to your site. This is a two step process.
- Set up a DNS
A
records for your domain pointing to the IP address of your server. Namecheap has instructions for setting up those records in their system: How can I set up an A (address) record for my domain? - Configure your web server to show your site when it gets requests for your domain name. You don't say what you are using for a web server, but this is typically done with virtual host configuration. If you are using a shared hosting service, there is almost always a way to enter your domain name into the administration panel for your site.
If you say more about where your site is hosted, I could help more with the second step.
Once your site is actually hosted at your domain name, then you can configure Oauth with Discord.