Providers

AuthGate supports five OAuth providers, email + password authentication, and magic link authentication. Each OAuth provider requires credentials from the provider's developer console and a redirect URI pointing back to AuthGate.

Redirect URI

All providers require a redirect URI. Set this in each provider's developer console:

{AUTHGATE_URL}/api/proxy/callback/{provider}

For example: https://auth.example.com/api/proxy/callback/google


OAuth 2.0PKCE

Google

Google uses OAuth 2.0 with PKCE for enhanced security.

Setup

  1. Go to the Google Cloud Console
  2. Create a new OAuth 2.0 Client ID (Web application type)
  3. Add the redirect URI: {AUTHGATE_URL}/api/proxy/callback/google
  4. Copy the Client ID and Client Secret

Scopes requested

  • openid
  • profile
  • email

Returned fields

FieldSource
providerAccountIdID token sub claim
emailID token email claim
nameID token name claim
avatarUrlID token picture claim

OAuth 2.0

GitHub

GitHub uses standard OAuth 2.0 without PKCE.

Setup

  1. Go to GitHub Developer Settings
  2. Create a new OAuth App
  3. Set the Authorization callback URL to {AUTHGATE_URL}/api/proxy/callback/github
  4. Copy the Client ID and Client Secret

Scopes requested

  • user:email
  • read:user

Returned fields

FieldSource
providerAccountIdGitHub user id
emailPrimary verified email from /user/emails
nameGitHub user name
avatarUrlGitHub user avatar_url

OAuth 2.0

Discord

Discord uses standard OAuth 2.0.

Setup

  1. Go to the Discord Developer Portal
  2. Create a new application
  3. Go to OAuth2 and add the redirect URL: {AUTHGATE_URL}/api/proxy/callback/discord
  4. Copy the Client ID and Client Secret

Scopes requested

  • identify
  • email

Returned fields

FieldSource
providerAccountIdDiscord user id
emailDiscord user email
nameDiscord user global_name (fallback to username)
avatarUrlConstructed from https://cdn.discordapp.com/avatars/{id}/{avatar}.png

OIDCPKCE

Azure / Entra ID

Azure uses OpenID Connect with PKCE.

Setup

  1. Go to the Azure Portal → App registrations
  2. Create a new registration
  3. Add the redirect URI (Web platform): {AUTHGATE_URL}/api/proxy/callback/azure
  4. Create a Client Secret under Certificates & secrets
  5. Copy the Client ID, Client Secret, and Tenant ID

Scopes requested

  • openid
  • profile
  • email

Returned fields

FieldSource
providerAccountIdID token sub claim
emailID token email or preferred_username claim
nameID token name claim
avatarUrlNot available from Azure

Sign in with Appleform_post

Apple

Apple Sign In uses a unique form_post response mode where the callback is a POST request.

Setup

  1. Go to the Apple Developer Portal
  2. Create a Services ID with Sign In with Apple enabled
  3. Configure the return URL: {AUTHGATE_URL}/api/proxy/callback/apple
  4. Create a private key for Sign In with Apple
  5. You'll need: Services ID (Client ID), Team ID, Key ID, and the private key

Scopes requested

  • name
  • email

Returned fields

FieldSource
providerAccountIdID token sub claim
emailID token email claim
nameFrom the user form parameter (first authorization only)
avatarUrlNot available from Apple

Email

Email + Password

Email + Password is not an OAuth provider — it's a separate authentication method that allows users to sign up and sign in with their email and a password.

Setup

No external provider configuration is needed. You need to configure AWS SES for sending verification and password reset emails:

  1. Set up AWS SES (see the infrastructure guide)
  2. Configure the AWS_SES_ACCESS_KEY_ID, AWS_SES_SECRET_ACCESS_KEY, AWS_SES_REGION, and EMAIL_FROM environment variables
  3. Enable the "Email + Password" provider in your project's dashboard settings

Features

  • Email + password signup and signin
  • Email verification via OTP code
  • Password reset via email
  • Rate limiting on all endpoints

Returned fields

FieldSource
providerAlways "email"
emailUser's email address
nameUser's display name (from signup)
email_verifiedtrue after entering verification code

See the Email Authentication guide and Email Auth Endpoints for full details.


Email

Magic Link is a passwordless authentication method — users receive an email with a one-time link that signs them in automatically. It is controlled independently from the Email + Password provider.

Setup

No external provider configuration is needed beyond AWS SES (same as Email + Password):

  1. Set up AWS SES (see the infrastructure guide)
  2. Configure the AWS_SES_ACCESS_KEY_ID, AWS_SES_SECRET_ACCESS_KEY, AWS_SES_REGION, and EMAIL_FROM environment variables
  3. Enable the "Magic Link" provider in your project's dashboard settings

Features

  • Passwordless sign in via email link
  • Automatic account creation for new users
  • Email is automatically verified
  • Rate limiting on send endpoint

Returned fields

FieldSource
providerAlways "magic-link"
emailUser's email address
nameUser's display name (if previously set)
email_verifiedAlways true (verified by clicking the link)

See the Email Auth Endpoints for the full API documentation.


MFA Policy

Each project can configure a multi-factor authentication policy that applies to all authentication methods:

  • Off (default) — MFA is not available
  • Optional — Users can enable MFA in their account settings
  • Required — All users must enroll in MFA before accessing protected resources

Configure the MFA policy in your project's dashboard settings. See the MFA guide for full details.

Was this page helpful?