tria-auth-core v1.1.0 provides shared JWT and Redis session authentication middleware for Express.js applications. It ships with TypeScript types and requires express >=4.18.0. Unlike generic auth libraries, it combines JWT stateless tokens with Redis-backed sessions for session revocation and blacklisting, supporting both auth patterns in a single package.
npm install tria-auth-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up Express with JWT authentication and role-based authorization middleware using tria-auth-core.
Add Redis connection check before starting Express server.
Use 'roles' instead of 'scope' in authenticate options.
Migrate to ESM imports; update Node.js to >=18.
Set JWT_SECRET in environment or pass secret directly in options.
Ensure client sends 'Authorization: Bearer <token>' header.
Start Redis server or update REDIS_URL env variable.