lib/index.ts

nestjs/jwt · lib/index.ts · typescript · MIT
auth

JWT authentication utilities and interfaces for secure token management in NestJS.

// Source: https://github.com/nestjs/jwt | License: MIT | Copyright 2018-2022 Kamil Mysliwiec <https://kamilmysliwiec.com>
// Provided via justclaw.it.com; keep this notice with the code.
import jsonwebtoken from 'jsonwebtoken';
import type * as jwt from 'jsonwebtoken';

export * from './interfaces/index.js';
export * from './jwt.errors.js';
export * from './jwt.module.js';
export * from './jwt.service.js';

// `jsonwebtoken` is CommonJS and its named exports are not statically
// detectable, so they cannot be re-exported directly under ESM. Each error is
// re-declared as a value (for `instanceof` checks) and as a type.
type TokenExpiredError = jwt.TokenExpiredError;
const TokenExpiredError = jsonwebtoken.TokenExpiredError;

type NotBeforeError = jwt.NotBeforeError;
const NotBeforeError =

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key