Files
oam/knowledge base/oauth2.md
2025-06-20 17:37:26 +02:00

2.0 KiB

OAuth 2.0

TODO

Intro

  1. TL;DR
  2. Use OAuth 2.0 in an application
  3. Further readings
    1. Sources

TL;DR

Use OAuth 2.0 in an application

Refer Setting up OAuth 2.0.

Caution

Google does not accept raw IP addresses.
Make sure the application is configured to use a fully-qualified domain name.

  1. Go to the Clients part of the Google Auth Platform console.
    Direct link.

  2. In the upper-left corner, select a Google Cloud project if none is already.

  3. Select the Create client button on top of the middle section.

  4. Complete the fields.

    Example: GitLab
     Application type: Web application
     Name: GitLab
     Authorized JavaScript origins: https://gitlab.example.org
     Authorized redirect URIs: # the domain name, followed by the callback URIs; add one at a time
       https://gitlab.example.org/users/auth/google_oauth2/callback
       https://gitlab.example.org/-/google_api/auth/callback
    
  5. Select the Create button. A window will pop up with the client ID and client secret.

  6. Note the client ID and secret down or download the JSON.

  7. Configure the application as appropriate.

Further readings

Sources