Function: generateSigningKey()
generateSigningKey(
args?):SigningKey
Defined in: auth-core/src/signingKeys.ts:100
Generates a fresh asymmetric signing key.
Run it once per key (e.g. from a script), store the result in the app's
secret store, and feed it to createSigningKeySet. The kid defaults to
the key's RFC 7638 thumbprint.
Parameters
| Parameter | Type |
|---|---|
args | { alg?: AsymmetricAlgorithm; kid?: string; } |
args.alg? | AsymmetricAlgorithm |
args.kid? | string |
Returns
Example
const key = generateSigningKey({ alg: 'EdDSA' });
// Store JSON.stringify(key) as a secret.