How can I access an app that requires Google login on my mobile device that is running on my local machine?

I would like to be able to be able to access an app on my mobile device via a LAN, that is running on my local machine and which requires a Google login.

  • I am running OSX Yosemite 10.10.3
  • I can access anonymous views (eg /login) of the app by entering the machine’s name in the browser (set in OSX sharing settings.) Eg in my case, this is “ajrmac.local” which I can access by going to http://ajrmac.local

The issue

  • The “.local” extension is appended by the operating system and is outside of my control.
  • My app requires login via a 3rd party provider. In my case, I am using Google. However, Google does not allow a redirect URI to have a .local extension. Here is an example of their error message:

  • I need to be able to view my app on a mobile device while working on it, and deploying every time to meteor.com or whatever is just too time-consuming.

My question

  • How can I map a URI that is acceptable to Google to my local app? In other words, how can I create something like mytestapp.com that I can use to access the app and sign in via my mobile device.
  • I explored using dnsmasq (which makes it easy to create names like mytestapp.dev locally) but this seems to always map to apache.

Any advice or tips would be be appreciated!

if you create some fake dns record in hosts file, it still complains?

Thanks for this suggestion. I did attempt to add an alias to localhost in the host file, such as devbox.com. However, while I can access that in my local browser, it is not accessible via the LAN. It appears that I need to find a way to alias the name of the machine itself rather than localhost.

I will continue to research. Thanks again.