generateSiwxJwtKey()
generateSiwxJwtKey(
alg?):Promise<{kid:string;privateJwk:JsonWebKey;publicJwk:SiwxPublicJwk; }>
Defined in: siwx-server/src/jwtKeys.ts:85
Generates a new JWT signing key. Run it once, store privateJwk as a secret (for example the environment variable
read by importSiwxJwtKey) and never expose it to the browser.
Parameters
alg?
SiwxJwtAlgorithm = 'ES256'
ES256 (P-256, default) or RS256 (2048-bit modulus, exponent 65537).
Returns
Promise<{ kid: string; privateJwk: JsonWebKey; publicJwk: SiwxPublicJwk; }>
The private JWK to store, the public JWK and its kid.
Last updated on