@express-tool/plugin-auth
v2.0.1
Published
This plugin adds robust authentication capabilities to your `express-tool` project, supporting JSON Web Tokens (JWT) out of the box. It scaffolds secure authentication middleware, routes, and utilities.
Readme
Express Tool Auth Plugin
This plugin adds robust authentication capabilities to your express-tool project, supporting JSON Web Tokens (JWT) out of the box. It scaffolds secure authentication middleware, routes, and utilities.
Installation
This plugin is automatically included when you select authentication options via the express-tool CLI. To install manually:
npm install @express-tool/plugin-authFeatures
- JWT Authentication: Secure token-based authentication setup.
- Middleware:
authenticateTokenmiddleware to protect routes. - Routes: Ready-to-use
/auth/loginand other auth endpoints. - TypeScript Support: Full type definitions for user payloads and request extensions.
Usage
When applied, this plugin generates:
middleware/auth.ts: Middleware to verify JWTs.routes/auth.ts: Authentication routes.
License
MIT
