Package Exports
- @nestdevx/token
- @nestdevx/token/dist/token/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nestdevx/token) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@nestdevx/token
Token module for multi-tenant NestJS applications. Provides JWT and refresh token utilities, guards, and strategies for authentication.
Features
- JWT access/refresh token generation and validation
- Multi-tenant token support
- Customizable token payloads
- Integration with @nestjs/jwt
Installation
Installation
npm install @nestdevx/token
# or
yarn add @nestdevx/token
# or
pnpm add @nestdevx/token
Usage
1. Import the Module
import { TokenModule } from '@nestdevx/token';
@Module({
imports: [
TokenModule.register(),
],
})
export class AppModule {}
3. Guards and Strategies
- Use the provided JWT guards and strategies for route protection.
API Reference
TokenModule.register()
– RegisterTokenService.verifyToken(token)
– Verify JWT access tokenTokenService.signJwt(payload)
– Create Tokenset token
License
MIT