What I need: Localhost points to the IP of my other PC on the local network.
What I tried: I added "IP localhost" to the /etc/hosts file. Command ran: "ipconfig /flushdns"
Browser: Edge/Chrome/Internet Explorer
This doesn't work, but if I name it anything else than "localhost" it does actually work. I know it is something about the DNS, but I read online that the hosts file should overwrite it.
Partly solution
Google OAuth only accepts localhost or example.com as redirect URL. Not being able to use localhost on a different PC for testing, I solved this by using example.com on both the local PC and the second PC. I added the following to the hosts file:
Local PC: 127.0.0.1 example.com
Second PC: IP_OF_LOCALPC example.com
You can then use URL example.com:PORT. This isn't supported by Microsoft OAuth though (I guess I will only use Google Login for developing). Any ideas on how to solve this for Microsoft OAuth are welcome :)