GuidesOAuthGoogle

Google

This will walk you through the process of setting up Google OAuth for your Zipline instance.

Create a Google OAuth2 Application

  1. Click "OAuth consent screen" on the sidebar
  2. It will ask you if you would like Internal or External, read the descriptions and choose the one that best fits your use case.
  3. Fill in the required fields like App name, User support email, Developer contact information, etc.
  4. Under Authorized domains, add your Zipline domain without the protocol (e.g. example.com instead of https://example.com).

Google OAuth Consent Screen
Google OAuth Consent Screen

  1. Click the "Save and Continue" button.
  2. Click the "Add or Remove Scopes" button on the next page.

Google OAuth Scopes
Google OAuth Scopes

  1. Under "Manually add scopes" add the following scopes:
    • https://www.googleapis.com/auth/userinfo.profile Then click the "Add to table button" button.
  2. Click "Update" button.

Google OAuth Scopes
Google OAuth Scopes

  1. Click the "Save and Continue" button.
  2. Feel free to add test users to your liking, then hit the "Save and Continue" button again.
  3. Finish the setup and head to the next section Create Credentials.

Create OAuth2 Credentials

  1. Head over to Google Cloud > Create OAuth client ID
  2. Select "Web Application" under Application Type
  3. Under "Authorized redirect URIs", add https://<your-domain>/api/auth/oauth/google
  4. Under "Authorized JavaScript origins", add https://<your-domain>

Google OAuth Redirect
Google OAuth Redirect

  1. Click "Create"
  2. On the next screen you will see your "Client ID" and "Client Secret". Save these for later, as you will not be able to see the secret again.

Google OAuth Client ID/Secret
Google OAuth Client ID/Secret

  1. Click "Library" on the sidebar
  2. Search for "People API" or click here
  3. Click "Enable", and wait for it to finish loading.

Google People API
Google People API

Configure Zipline

Set the OAUTH_GOOGLE_CLIENT_ID and OAUTH_GOOGLE_CLIENT_SECRET environment variables to the values you copied earlier.

OAUTH_GOOGLE_CLIENT_ID=1234567890
OAUTH_GOOGLE_CLIENT_SECRET=qwertyuiopasdfghjklzxcvbnm

Make sure you have the FEATURES_OAUTH_REGISTRATION environment variable set to true, or none of the endpoints will work.

If you have set up everything correctly, you can now navigate to the login page and click the "Login with Google" button.

Last updated: 9/1/2024
Edit this page on GitHub