简体   繁体   English

如何将动态 IP 地址添加到 Google Cloud 中的“授权 javascript 来源”列表中,以便将 Google 登录集成到我的 web 应用程序中?

[英]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.计算机的IP地址是动态的。 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.我可以复制 IP 地址,将其添加到已批准的 javascript 来源列表中,并在我的 web 应用程序中使用 Google 登录选项,而不会遇到任何问题。 Therefore, I'm looking for a solution that enables the dynamic IP address to be used for Google Sign-In as well.因此,我正在寻找一种解决方案,使动态 IP 地址也可用于 Google 登录。 I don't want to manually input the IP address as a URL in the allowed javascript origin.我不想在允许的 javascript 原点中手动输入 IP 地址作为 URL。

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.您必须在 Google Developer Console 中的 OAuth 凭证中仅使用您批准的来源中的有效域名。

https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow#origin-validation 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.您可以使用动态 DNS 从您的计算机上使用动态 IP 运行域名。 https://en.wikipedia.org/wiki/Dynamic_DNS https://en.wikipedia.org/wiki/Dynamic_DNS

Most domain name providers will work with DDNS.大多数域名提供商将使用 DDNS。 https://www.cloudflare.com/learning/dns/glossary/dynamic-dns/ 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.然后,该域可用于您的网络应用程序的已批准 Google 登录来源。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以将 IP 地址添加到 Google 控制台允许的 javascript 授权来源列表中? - Is it possible to add an IP address to the Google Console's list of allowed javascript authorised origins? 如何在我的 Cloud-Run Flask 应用程序中获取用户的 IP 地址? - How can I get the user's IP-Address in my Cloud-Run Flask app? 我的 Flutter 应用程序中的 Google 登录失败 - Google sign-in is failing in my Flutter app 如何让 Google Cloud Logging 以正确的警报级别显示我的 flask + gunicorn 应用程序的日志? - How can I get Google Cloud Logging to show my flask + gunicorn app's logs with the correct alert level? 我应该将谷歌登录变量传递给其他 class 吗? - Should I pass the google sign-in variables to other class? 我可以获得我的 Google Cloud Functions 的根 URL 吗? - Can I get root URL to my Google Cloud Function? 如何在没有 JavaScript 令牌的情况下将文件上传到谷歌云存储 - How can I upload files to google cloud storage without token in JavaScript 如何使用 Terraform 在不同项目中为 Google Cloud 中的其他项目服务帐户添加 IAM 角色 - How can I add IAM role for other project service account in Google Cloud in different project using Terraform 如何自动将数据加载到 Google Cloud Storage 中? - How can I automate data loading into Google Cloud Storage? 如何使用 google cloud bigquery 进行集成测试 - How can I make integration tests with google cloud bigquery
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM