Disconnecting and revoking scopes

  • Support for the Google Sign-In library is deprecated, and users should refer to the Deprecation and Sunset guide.

  • The Google Sign-In library will eventually require the use of FedCM APIs, and an impact assessment is recommended.

  • It is recommended to provide a way for users to delete the association between your app and their account.

  • A JavaScript example is provided demonstrating how to programmatically revoke a user's scopes.

It is recommended that your app provide a way to delete the association between your app and a user's account. By adding this capability to your app, you can respond to the event and trigger any appropriate logic such as deleting personal information associated with the account.

The following JavaScript example demonstrates how to revoke a user's scopes programmatically.

var revokeAllScopes = function() {
  gapi.auth2.getAuthInstance().disconnect();
}