@nestdevx/token
v1.0.1
Published
Token module for multi-tenant NestJS applications.
Downloads
8
Maintainers
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/tokenUsage
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
