Skip to main content
Module

x/jose/index.ts>SignJWT#sign

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno.
Extremely Popular
Go to Latest
method SignJWT.prototype.sign
import { SignJWT } from "https://deno.land/x/jose@v4.8.3/index.ts";

Signs and returns the JWT.

Parameters

key: KeyLike | Uint8Array

Private Key or Secret to sign the JWT with.

optional
options: SignOptions

JWT Sign options.

Returns

Promise<string>