Table of Contents

**@arolariu/website**


@arolariu/website / sites/arolariu.ro/src/lib/utils.server / createJwtToken

Function: createJwtToken()

createJwtToken(payload, secret): Promise<string>

Defined in: lib/utils.server.ts:65

Creates a JWT token using the jose library. This function signs the payload with the provided secret using HS256 algorithm.

Parameters

payload

Readonly<JWTPayload>

The JWT payload containing claims (iss, aud, sub, iat, exp, etc.)

secret

string

The secret key for signing the token (base64 encoded)

Returns

Promise<string>

Promise resolving to the signed JWT token string

See

https://github.com/panva/jose