Skip to main content

Get credentials

1

Create an application

For gitlab.com: Go to gitlab.com/-/profile/applications.For a self-hosted instance: Go to your instance URL, then User Settings > Applications.
  • Name: your app name
  • Redirect URI: https://auth.example.com/auth/oauth/callback/gitlab
  • Scopes: check read_user (and email if you request it)
2

Copy credentials

After saving, copy the Application ID and Secret.

Configuration

lib/theauth.ts

Scopes

Default scope: read_user. Scopes you pass are added on top of the default.

User data returned

For self-hosted GitLab instances, make sure your theAuth server can reach the GitLab API. If you are behind a VPN or firewall, the token exchange and user info calls will fail if the instance is not reachable from your server.

OAuth overview

Generic OAuth 2.0 setup and account linking behavior.

GitHub

Sign in with GitHub OAuth 2.0.

Notion

Another work and productivity OAuth provider.

Authentication overview

All sign-in methods available in theAuth.
Last modified on October 7, 2026