auth.provider API
    Preparing search index...
    interface KeyStore {
        algorithm: Algorithm;
        getSigningKidFallback(): string;
        getVerificationKey(kid: string): Promise<KeyLike>;
        getVerificationKeys(): Promise<ManagedKey[]>;
        sign(options: SignJwtOptions): Promise<string>;
    }
    Index

    Properties

    algorithm: Algorithm

    Methods

    • Returns the current signing kid as a fallback for verifying legacy/malformed tokens that lack a kid header. Do not use for rotation-safe lookup — for rotation, pass the token's own kid to getVerificationKey(kid).

      MUST be synchronous and cheap. Remote-sign adapters (KMS/HSM) must cache the current kid locally and return it without any remote call. Never exposes private key material.

      Returns string

    • Sign claims and return a compact JWT. The KeyStore self-injects alg and kid into the protected header; callers may set only typ. Remote-sign adapters (KMS/HSM) perform the remote call here.

      Parameters

      Returns Promise<string>