Configure OAuth 2.0 for Google
You must configure your app’s Google OAuth 2.0 secrets in the following cases:
- You would like to use the User Management Service to authenticate users into your app through Google as identity provider.
- You would like to use the Email Service in order to let your app’s users to connect their Google-managed inbox to the app, for sending email directly from the app. For details about this scenario, see Sending email from a Google or Microsoft 365 email address.
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:
- Sign in to the SBS Console.
- In the left-hand side navigation menu, click Applications.
- Select your application, and then click the OAuth2 tab.
- Click the Google Client tab.
- Click Edit. A dialog box opens.
- Enter your Google client secrets as obtained from the Google Cloud Console, and then click Save.
GraphQL
To configure the Google OAuth 2.0 client from GraphQL:
- 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.
- Run the
updateApp
mutation of the Account API and provide the OAuth 2.0 secrets obtained from Google as parameters toGoogleClientSecret
.
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"
}
}
}
}