@grow-codes/oidc - v0.1.2
    Preparing search index...

    Class Verifier

    Verifies OIDC access tokens (JWT) against the issuer's JWKS.

    Checks the signature (RS256/384/512, PS256/384/512, ES256/384/512, EdDSA allow-list; the key's kty, EC crv and alg must match the token's algorithm), iss (exact, trailing slashes ignored), aud (contains), exp (required) and nbf with a clock skew (default 60 s). Keys come from jwksUrl or OIDC discovery, are cached (default 10 min) and refetched when a token names an unknown kid (key rotation, at most once per cooldown).

    Errors: AuthenticationError for every invalid token (the message names the failed check, never the token), UnavailableError when discovery/JWKS cannot be fetched, ConfigError for bad options.

    Index
    algorithms: readonly SigningAlgorithm[]
    audience: string
    clockSkewMs: number
    issuer: string
    rolesClaim: string
    • Drops the cached JWKS so the next verification refetches it.

      Returns void

    • Builds a verifier from GROW_AUTH_ISSUER (required), GROW_AUTH_AUDIENCE (default GROW_AUTH_CLIENT_ID), GROW_AUTH_JWKS_URL, GROW_AUTH_ROLES_CLAIM (default roles) and GROW_AUTH_CLOCK_SKEW (duration, default 60s). Explicit overrides win.

      Parameters

      Returns Verifier