简体   繁体   中英

How can I add a dynamic IP address to the "Authorised javascript origins" list in Google Cloud so that I can integrate Google sign-in into my web app?

The IP address of the computer is dynamic. I can copy the IP address, add it to the list of approved javascript origins, and use the Google sign-in option in my web app without encountering any problems. Therefore, I'm looking for a solution that enables the dynamic IP address to be used for Google Sign-In as well. I don't want to manually input the IP address as a URL in the allowed javascript origin.

Any ideas, sticking with this for a while?

If it is possible using ddns, how it to be???

You must use valid domain names only in your approved origins in the OAuth credentials in Google Developer Console.

https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow#origin-validation

You could use Dynamic DNS to run a domain name from your computer with dyanmic IP. https://en.wikipedia.org/wiki/Dynamic_DNS

Most domain name providers will work with DDNS. https://www.cloudflare.com/learning/dns/glossary/dynamic-dns/

That domain can then be used for an approved Google sign-in origin for your web-app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM