-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Google OAuth
Sidekick integrates with Google OAuth for both authentication and as an integration for Gmail and Google docs data.
Create a new Google OAuth application that can be used to authenticate your team and allow their Google data to be integrated into Sidekick. Creating an OAuth app is free and does not require that you host the application on GCP.
-
Create a new project in your Google Cloud account.
-
Once initialized, configure the consent screen for users that sign up to your Sidekick instance.

-
In the next screen, configure the OAuth application according to how you want it to be displayed to your users.
-
Ensure that 'Authorized Domains' is setup to point at the URL where your Sidekick instance will be deployed. For example, if you want your application to be available at
https://search.acmeco.com, add "acmeco.com" URL as an authorized domain.ℹ️ If you see the error "Must be a top level domain" when adding your authorized domain, you may need to authenticate your domain with Google. To do so, add your domain as a property with Google Search Console.

-
Enable all of the default scopes for your application. In addition, add scopes that will allow Sidekick to ingest Gmail and Google Drive data.
Once your scopes have been added, the add/remove scopes table should look like this:

-
Create credentials for the Google OAuth application.
-
On the OAuth credentials screen, click 'Create Credentials' and then 'Client OAuth ID'.

-
Select 'Web Application' and fill in the "Authorized Javascript Origin" and "Authorized Redirect URIs" fields.
-
In "Authorized Javascript Origin", add the URL where you will host this application. Eg: "https://search.acmeco.com"
-
In "Authorized Redirect URIs" add the following paths with your URL prefixed.
/auth/google_oauth2/callback/_/permissions/google_with_google_drive/callback/_/permissions/google_with_gmail/callback
For example, if your base URL is
https://search.acmeco.com, addhttps://search.acmeco.com/auth/google_oauth2/callback,https://search.acmeco.com/_/permissions/google_with_google_drive/callback, andhttps://search.acmeco.com/_/permissions/google_with_gmail/callbackas an authorized redirect URI.
-
-
Create the credentials and copy the Client ID and Secret. Add these as environment variables to your deployment under
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.
-