{"id":18176,"library":"brewery-auth-test","title":"brewery-auth-test","description":"An authentication package built on PassportJs supporting login, signup, MFA, password reset, and profile management. Currently at version 1.2.20 with no recent updates; depends on Nexmo and Sendgrid accounts. Compared to PassportJs alone, it bundles database integration, token refresh, and SMS/email verification out of the box, but is narrowly scoped and not actively maintained.","status":"maintenance","version":"1.2.20","language":"javascript","source_language":"en","source_url":"https://github.com/jurelmartin/auth-test","tags":["javascript","auth"],"install":[{"cmd":"npm install brewery-auth-test","lang":"bash","label":"npm"},{"cmd":"yarn add brewery-auth-test","lang":"bash","label":"yarn"},{"cmd":"pnpm add brewery-auth-test","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core authentication middleware","package":"passport","optional":false}],"imports":[{"note":"CJS only; no default ESM export.","wrong":"import BreweryAuth from 'brewery-auth'","symbol":"BreweryAuth","correct":"const BreweryAuth = require('brewery-auth')"},{"note":"If using TypeScript with esModuleInterop, some bundlers may require .default.","wrong":"const BreweryAuth = require('brewery-auth')","symbol":"BreweryAuth","correct":"const BreweryAuth = require('brewery-auth').default"},{"note":"Default export only, not a named export.","wrong":"import { BreweryAuth } from 'brewery-auth'","symbol":"BreweryAuth","correct":"import BreweryAuth from 'brewery-auth'"}],"quickstart":{"code":"const BreweryAuth = require('brewery-auth');\n\nconst config = {\n  dbConfig: {\n    databaseName: process.env.DB_NAME ?? '',\n    username: process.env.DB_USERNAME ?? '',\n    password: process.env.DB_PASSWORD ?? '',\n    dialect: process.env.DB_DIALECT ?? '',\n    host: process.env.DB_HOST ?? ''\n  },\n  salt: process.env.SALT ?? '',\n  tokenSecret: process.env.ACCESS_TOKEN_SECRET ?? '',\n  refreshSecret: process.env.REFRESH_TOKEN_SECRET ?? '',\n  nexmoSecret: process.env.NEXMO_API_SECRET ?? '',\n  nexmoKey: process.env.NEXMO_API_KEY ?? '',\n  sendgridKey: process.env.SENDGRID_API_KEY ?? '',\n  senderEmail: process.env.SENDER_EMAIL ?? '',\n  senderSms: process.env.SENDER_SMS ?? ''\n};\n\nconst auth = new BreweryAuth(config);\nauth.login({ clientId: 'my-client', clientSecret: 'my-secret' })\n  .then(result => console.log(result))\n  .catch(err => console.error(err));","lang":"javascript","description":"Instantiates BreweryAuth with environment config and performs a login."},"warnings":[{"fix":"Consider migrating to a maintained auth library like Passport.js directly or using Identity platforms.","message":"Package has not been updated since 2021; may rely on outdated dependencies.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure all environment variables are set or provide defaults.","message":"BreweryAuth class requires all config properties; missing properties may cause silent failures.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update config to include salt and use tokenSecret instead of previous secret key.","message":"Version 1.2 changed the config structure; salt field added and tokenSecret renamed.","severity":"breaking","affected_versions":">=1.2.0 <1.3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use const BreweryAuth = require('brewery-auth');","cause":"Importing as named instead of default in CJS.","error":"TypeError: BreweryAuth is not a constructor"},{"fix":"Run npm install brewery-auth-test and require as 'brewery-auth' (note: npm name is brewery-auth-test but require path is brewery-auth).","cause":"Package not installed or name misspelled.","error":"Cannot find module 'brewery-auth'"},{"fix":"Ensure .env file exists and contains all required variables.","cause":"Missing configuration file or environment variable.","error":"Error: ENOENT: no such file or directory, open '...'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}