从 Google+ 登录迁移到 Google 登录的范围

Scopes for migration from Google+ Sign-In to Google Sign-In

我收到了一封来自 Google 的邮件,通知我必须在 3 月 7 日之前确保我的项目不再使用受影响的 Google+ API 将被折旧. 这是我在构建 Google 登录时的当前实现:

 GoogleSignInOptions gso = new GoogleSignInOptions
                .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail()
                .build();

根据我在文档中阅读的内容:"By using GoogleSignInOptions.Builder with the DEFAULT_SIGN_IN option, you will automatically request the profile scope which provides the user’s name and profile picture"

邮件说 plus.people.get 对应的 Google+ API 方法仍在使用(并将被折旧)和关机。

如果您看到 API 调用 people.get,这可能是在您的应用程序中使用 Google+ 登录功能的结果,即现在已完全弃用并正在关闭。开发人员应从 Google+ 登录功能迁移到更全面的 Google 登录身份验证系统。

我在 1 个月前向商店发布了我的应用更新。在重新发布应用程序之前,我是否需要再次对我的应用程序进行一些更改(用于 Google 登录)?

我收到了同样的邮件,我很困惑。首先。您也可以通过使用一些 Google+ 小部件(例如在您的网站上 - 按钮等)来获取此邮件。

我不确定你是否收到标题中的第二封邮件[更正]。

Earlier this week we sent you an email related to your projects that will be impacted by the Google+ API shutdown, which also affects requests for Google+ OAuth scopes.

The email listed that one or more of your projects are requesting the “plus.me” scope, and would thus be affected. We would like to clarify that only projects directly requesting the “plus.me” scope are affected. This scope may have been listed in some emails, even if not directly requested by your project. We apologize for any confusion caused.

If you are directly requesting the “plus.me” scope, any other Google+ OAuth scopes, or making any Google+ API calls, please ensure that you remove these requests from your project before March 7, 2019.

To see if your project is directly requesting the “plus.me” or any other Google+ OAuth scopes: https://developers.google.com/apps-script/concepts/scopes

If your project is written in Google Apps Script, you can view which scopes your project is requesting by reviewing your project properties in App Script Editor. If your project is not written in Google Apps Script, please check your code for references to “plus.me” in OAuth scope requests. We recommend that you review projects using any 3rd-party libraries that support sign-in or social functionality, as these may also be affected by the shutdown. Thanks for being a valued Google+ Developer.

请务必也阅读此内容。你会在这里找到一些说明: https://developers.google.com/identity/sign-in/android/quick-migration-guide

看起来您正在使用新的 GoogleSignIn API,所以您应该没问题。我现在正在使用相同的方法。确保在 gradle.

中使用最新版本的 Play 服务之一

当您的用户没有更新您的 apk 或从 third-party Play 商店(手动安装)使用您的 apk 时,您仍然可以收到一些对旧 API 的请求。我们对此无能为力。