Configure OAuth 2.0 for Google


You must configure your app’s Google OAuth 2.0 secrets in the following cases:

Before you proceed, you must first obtain the OAuth 2.0 credentials from Google, see Configure an OAuth 2.0 client in Google.

Configure the Google OAuth 2.0 Client in SBS

To configure the Google OAuth 2.0 client in SBS:

  1. Sign in to the SBS Console.
  2. In the left-hand side navigation menu, click Applications.
  3. Select your application, and then click the OAuth2 tab.
  4. Click the Google Client tab.
  5. Click Edit. A dialog box opens.
  6. Enter your Google client secrets as obtained from the Google Cloud Console, and then click Save.

SBS Console Update Google Client

GraphQL

To configure the Google OAuth 2.0 client from GraphQL:

  1. Obtain your Google OAuth 2.0 client secrets from the Google Cloud Console. For more information, see Configure an OAuth 2.0 client in Google.
  2. Run the updateApp mutation of the Account API and provide the OAuth 2.0 secrets obtained from Google as parameters to GoogleClientSecret.
mutation update_app($id: ID!, $input: UpdateAppInput!) {
  updateApp(id: $id, input: $input) {
    googleClientSecret {
      web {
        client_id
        auth_uri
        token_uri
        auth_provider_x509_cert_url
        client_secret
        redirect_uri
      }
    }
  }
}

Make sure to replace variables with your own values.

{
  "id": "YOUR_APPLICATION_ID",
  "input": {
    "googleClientSecret": {
      "web": {
        "client_id": "YOUR_CLIENT_ID",
        "auth_uri": "YOUR_AUTH_URI",
        "token_uri": "YOUR_TOKEN_URI",
        "auth_provider_x509_cert_url": "YOUR_AUTH_PROVIDER_X509_CERT_URL",
        "client_secret": "YOUR_CLIENT_SECRET",
        "redirect_uri": "YOUR_REDIRECT_URI"
      }
    }
  }
}