Ron
Ron

Reputation: 137

Error when accessing Google OAuth from Docker container : device_id and device_name are required for private IP

I have a dockerized flask app running from a docker-machine with IP 192.168.99.100 that is trying to access Google OAuth. However, I am getting the following error:

Error: invalid_request

device_id and device_name are required for private IP: http://192.168.99.100:8001/login/authorized

I tried the suggestions from Why is Google Oauth returning `invalid redirect_urI` in my Rails app? and edited my /etc/hosts

My /etc/hosts:

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost
192.168.99.100 chatbot appiumchatbot.com

and updated OAuth details in the google console.

Google OAuth details:

Authorized JavaScript origins: http://appiumchatbot.com
Authorized redirect URIs: http://appiumchatbot.com:8001

update

I even tried the xip and nip methods suggested in Error: invalid_request device_id and device_name are required for private IP

I am still getting the exact same error. Any ideas?

Upvotes: 1

Views: 2885

Answers (1)

GEEEKNEERD
GEEEKNEERD

Reputation: 29

if you have a trouble with accessing to your web with xip.io, you should check about somethings below

  1. google redirect uri : http://192.168.99.100.xip.io:8001/login/authorized
  2. for testing on a local host, access to 192.168.99.100.xip.io:8001 instead of 192.168.99.100:8001

Upvotes: -1

Related Questions