Docs menu: Overview

Strategy-based OAuth2 authentication for Gleam

OAuth sign-in for Gleam apps, without the guesswork.

Vestibule gives Gleam applications a consistent request/callback flow, normalized auth results, PKCE, CSRF state, provider strategies, and Wisp or Mist middleware without hiding the security responsibilities your app still owns.

  1. Request URL, state, PKCE verifier
  2. Store Bind transient callback data
  3. Callback Validate and normalize user info

Start with the integration shape.

Use core APIs when you want direct control, Wisp or Mist middleware when you want routing helpers, GitHub in core, and provider packages when your app needs Google, Microsoft, or Apple.

let assert Ok(auth_request) = vestibule.create_authorization_request(strategy, cfg)
// Store auth_request.state and auth_request.code_verifier.
// Redirect to auth_request.url.

let assert Ok(auth) =
  vestibule.handle_callback(
    strategy,
    cfg,
    params,
    expected_state,
    code_verifier,
  )

Supported providers

Start with GitHub from core, then add Google, Microsoft, or Apple when your app needs those provider-specific flows.

Packages by job

Pick the package by the responsibility it should own in your app.

Secure defaults, explicit boundaries.

Vestibule creates strong state tokens, applies PKCE, validates callback state before surfacing provider details, and verifies the provider-specific data it owns. Your application still stores transient callback data, protects bearer credentials, and decides how users map to accounts.

Review caller responsibilities