Skip to main content

Function: signJwt()

signJwt(args): string

Defined in: auth-core/src/jwt.ts:84

Signs a JWT, with HMAC-SHA256 (HS256) given a secret, or with an asymmetric key (EdDSA / ES256, kid in the header) whose public half a third party verifies through a JWKS.

For Amazon Cognito tokens, use @ttoss/auth-core/amazon-cognito instead — this helper is meant for self-hosted authentication where the application owns the signing key.

Parameters​

ParameterType
argsobject & JwtSigningKeyArgs

Returns​

string