Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook app, OAuth redirect to local virtual machine

I've got a virtual machine running on ESXI which I use for local development, I access this machine in my browser via a local domain, http://dev for example. This all works well and no issue for years until I've just started using Facebook Login which requires OAuth redirect URLs to be 'real'.

I can no longer use my http://dev as it won't allow it, I noticed it will however allow http://localhost.

I should note I'm not always using apache/nginx etc so I don't want to be creating virtual hosts

How do I go about being able to register a virtual machine for a OAuth redirect when it's not accessible on localhost?

like image 990
Chris Turner Avatar asked Jan 17 '26 04:01

Chris Turner


1 Answers

Despite being sure I've tried this before, I did just try the local IP address of the server (192.168.0.111) and looks like that worked for the redirect/callback on the Facebook Developers Console.

So, while not ideal, you can use the local IP rather than the hostname.

like image 97
Chris Turner Avatar answered Jan 19 '26 19:01

Chris Turner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!