Node.js authentication library for TM APIs, version 1.1.45. Provides token-based auth and session management with Prisma ORM integration. Released irregularly. Key differentiators: simple setup with Prisma, supports JWT and OAuth2, designed for TM microservices. Alternatives like Passport.js are more flexible but require more configuration.
npm install tm-api-authNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize the auth library with environment variables, apply middleware, and create a user.
Run 'npx prisma migrate dev --name init' after installing dependencies
Set AUTH_SECRET environment variable to a strong random string
Replace verifyToken calls with authenticate middleware
Ensure 'npm install tm-api-auth' is run and import path is correct
Check DATABASE_URL in .env and ensure MySQL is accessible
Add AUTH_SECRET to .env file or set via deployment config