Stone.js API
    Preparing search index...

    The authentication service.

    Stateless and edge-native: it wraps jose to sign and verify JWTs on Node, the browser, Deno, Bun and the edge — no session store. It supports a shared secret (HMAC), an asymmetric key pair (RS/ES/PS), and remote JWKS verification for tokens issued by an external identity provider (OAuth/OIDC), plus issuer/audience/scope checks.

    Implements

    Index
    • Decode a token without verifying it. Never trust the result for authorization decisions.

      Type Parameters

      Parameters

      • token: string

        The compact JWT.

      Returns T

      The decoded claims.

    • Verify a token and return its claims.

      Type Parameters

      Parameters

      • token: string

        The compact JWT.

      • options: VerifyOptions = {}

        Per-call verification overrides.

      Returns Promise<T>

      The verified claims.

      When the token is missing, invalid or expired.