【问题标题】:Allow only Google Workspace accounts with Google OAuth SSO仅允许使用 Google OAuth SSO 的 Google Workspace 帐户
【发布时间】:2022-03-15 00:44:30
【问题描述】:

我正在使用 Google OAuth SSO 对访问我网站的用户进行身份验证。

如何在 Google“选择帐户”屏幕中仅显示 Google Workspace (GSuite) 帐户,而不显示所有 Google 帐户 (gmail)?

喜欢https://www.g2.com/authorize 的网站

谢谢, 沙哈尔

【问题讨论】:

    标签: oauth-2.0 google-oauth


    【解决方案1】:

    我找到了解决办法。

    当将用户重定向到 https://accounts.google.com/o/oauth2/auth/oauthchooseaccount url 时,您应该添加查询参数 hd=*,因此 Google 将只显示 Google 工作区帐户。 但是,用户仍然可以手动输入 gmail 帐户。

    【讨论】:

      猜你喜欢
      • 2021-06-10
      • 2014-10-10
      • 2021-09-27
      • 2021-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-23
      相关资源
      最近更新 更多