auth.provider API
    Preparing search index...

    Function createSymmetricKeyStore

    • Creates an HS256 KeyStore that resolves the verification key by kid.

      Rotation (IH-9): when previousSecrets is non-empty, the keystore can verify tokens signed by an older key whose kid is recorded in that array. Issuance always uses the current secret/kid. Lookup is by the JWT kid header — the keystore returns the matching key directly, never trial-verifies across multiple keys, mirroring the asymmetric previousKeys rotation path.

      Parameters

      • secret: string
      • kid: string = "v0"
      • previousSecrets: readonly SymmetricPreviousSecret[] = []

      Returns KeyStore