非工作区用户可以使用服务帐号进行Google的OAuth2调用(Google登录)吗?

huangapple go评论64阅读模式
英文:

Can non-workspace users use service accounts for google's oauth2 calls (Google Sign In)?

问题

我在寻找一个关于如何设置服务账号的合适教程,以便我的个人网站可以使用Google登录。服务账号需要什么角色?我还没有Google Workspace。

我目前正在使用"gcloud auth application-default login"命令中的"应用默认凭据(ADC)",并处于"测试"模式下的项目。

英文:

I'm having trouble finding a decent tutorial on how to set up a service account so that my personal website can use Google Sign In. What role does the service account need? I don't have google workspace (yet).

I'm currently using "Application Default Credentials (ADC)" from gcloud auth application-default login w/ the project in "test" mode...

答案1

得分: 0

基本上,你在使用Google登录的基本功能时,不需要使用与你的项目关联的客户端ID之外的任何身份验证。

我知道这一点是因为我删除了所有的身份验证密钥/JSON文件,除非它们被存储在某个地方,否则一切仍然正常运作。当使用golang的google.golang.org/api/idtoken库来处理Google登录用户流程时,这似乎是正确的。

英文:

Fundamentally, you don't need to use any auth outside of the client id associated with your project for the basic functions of Google Sign In.

I know this because I deleted all of my auth keys/json files, and unless they are stored somewhere, everything still functions. This seems to be true when using the golang google.golang.org/api/idtoken library to process Google Sign In user flows.

huangapple
  • 本文由 发表于 2023年7月18日 11:41:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76709398.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定