Skip to content

Google OAuth

Create OAuth credentials in a Google Cloud project

Section titled “Create OAuth credentials in a Google Cloud project”

https://developers.google.com/workspace/guides/create-credentials#oauth-client-id

Steps:

  1. Create a new GCP project, or use an existing one
  2. Navigate to “APIs & Services > Credentials”
  3. Click ”+ CREATE CREDENTIALS” > OAuth client ID
  4. Select”Web application” as the Application type
  5. Name it “OpenRelik Localhost” or to whatever you want (it doesn’t matter)
  6. In “Authorized redirect URIs” click ”+ ADD URI”
  7. Enter “http://localhost:8710/auth
  8. Click “SAVE”

On the right you will have details for your new credentials. The important ones are:

  • Client ID
  • Client secret

You need both of these in the next step.

Configure the Google OAuth credentials that was created in the previous step.

Terminal window
client_id = "<CLIENT ID FROM PREVIOUS STEP>"
client_secret = "<CLIENT SECRET FROM PREVIOUS STEP>"

Grant yourself access to the server

Terminal window
allowlist = ['<YOUR GMAIL ACCOUNT NAME>@gmail.com']