@supabase/server - v1.1.0
    Preparing search index...

    Type Alias AuthMode

    AuthMode: "none" | "publishable" | "secret" | "user"

    Authentication mode that determines what credentials a request must provide.

    • "none" — No credentials required. Every request is accepted.
    • "publishable" — Requires a valid publishable key in the apikey header.
    • "secret" — Requires a valid secret key in the apikey header (timing-safe comparison).
    • "user" — Requires a valid JWT in the Authorization: Bearer <token> header.
    // Single mode
    withSupabase({ auth: 'user' }, handler)

    // Multiple modes — the first match wins.
    // A mode is tried only when its credential is present; a JWT that is
    // present but fails verification rejects immediately rather than falling
    // through to the next mode.
    withSupabase({ auth: ['user', 'publishable'] }, handler)