propro-utils is a comprehensive Node.js middleware for authentication, authorization, and utility functions in Express applications, version 1.7.53. It provides server-side and client-side authentication, profile management (password, email, 2FA, avatar), token refresh, logout, and app settings routes. Unlike generic auth middleware, it integrates tightly with propro-auth and offers a configurable options object. Released under ISC license, maintained by ProPro Productions.
npm install propro-utilsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up Express app with propro-utils authentication middleware using options from environment variables.
Always instantiate with 'new' or use a factory if provided.
Explicitly set 'secret' option to a strong, environment-specific value.
Always provide a valid Mongoose-like user schema (object with find method).
Ensure you use `const AuthMiddleware = require('propro-utils').default;` if package exports as default, or check the module's export structure.Install jsonwebtoken: `npm install jsonwebtoken` or `yarn add jsonwebtoken`.
Ensure you pass a valid user schema object as the second argument.