Can a public IP address be used as Google OAuth redirect URI?

前端 未结 7 2205
孤街浪徒
孤街浪徒 2020-12-04 16:01

I\'m trying to set a web service that needs the user\'s Google Latitude info, so I\'m using Google OAuth to get the user authorization stuff.

However, when trying to

相关标签:
7条回答
  • 2020-12-04 16:11

    Yes, as of now you still need to have a domain name to use Google OAuth in your application. If you have a static public IP and don't want to buy a domain name, you could use a free subdomain from FreeDNS to link to your public IP. Seemed to work well enough for me with a Django app.

    0 讨论(0)
  • 2020-12-04 16:16

    This is not currently supported. I filed a feature request and will update on progress.

    0 讨论(0)
  • 2020-12-04 16:22

    I ran into this issue too and so I entered a URL with a .com extension and also entered it into my /etc/hosts file. Works like a charm.

    It totally sucks that my entire app now has to be developed on an apparently 'live' domain though.

    0 讨论(0)
  • 2020-12-04 16:22

    I used my public hostname. It helps if you have a static IP address. I used http://www.displaymyhostname.com/ to get my hostname. I plugged it straight into the Authorized JavaScript origins field when I created a new Web Application Client ID.

    P.S. My hostname looked something like this: 111.111.111.111.static.exetel.com.au

    0 讨论(0)
  • 2020-12-04 16:23

    You can use xip.io to work around it.

    For example: '192.168.0.50.xip.io:3000' will resolve to '192.168.0.50:3000'

    0 讨论(0)
  • 2020-12-04 16:27

    Try using the full server name.

    It is obtained from MyPC/Properties... something like http://mypcname.mydomain.name:8080

    0 讨论(0)
提交回复
热议问题