Registry / auth-security / brewery-auth-test

brewery-auth-test

JSON →
library1.2.20jsnpmunverified

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.

npm install brewery-auth-test
INSTALL
IMPORT
SIG · BREWERY-AUTH-TEST
B
brewery-auth-test
auth-securityjavascriptv1.2.20
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BreweryAuth
const BreweryAuth = require('brewery-auth')
import BreweryAuth from 'brewery-auth'
CJS only; no default ESM export.
BreweryAuth
const BreweryAuth = require('brewery-auth').default
const BreweryAuth = require('brewery-auth')
If using TypeScript with esModuleInterop, some bundlers may require .default.
BreweryAuth
import BreweryAuth from 'brewery-auth'
import { BreweryAuth } from 'brewery-auth'
Default export only, not a named export.

Instantiates BreweryAuth with environment config and performs a login.

const BreweryAuth = require('brewery-auth'); const config = { dbConfig: { databaseName: process.env.DB_NAME ?? '', username: process.env.DB_USERNAME ?? '', password: process.env.DB_PASSWORD ?? '', dialect: process.env.DB_DIALECT ?? '', host: process.env.DB_HOST ?? '' }, salt: process.env.SALT ?? '', tokenSecret: process.env.ACCESS_TOKEN_SECRET ?? '', refreshSecret: process.env.REFRESH_TOKEN_SECRET ?? '', nexmoSecret: process.env.NEXMO_API_SECRET ?? '', nexmoKey: process.env.NEXMO_API_KEY ?? '', sendgridKey: process.env.SENDGRID_API_KEY ?? '', senderEmail: process.env.SENDER_EMAIL ?? '', senderSms: process.env.SENDER_SMS ?? '' }; const auth = new BreweryAuth(config); auth.login({ clientId: 'my-client', clientSecret: 'my-secret' }) .then(result => console.log(result)) .catch(err => console.error(err));
Debug
Known issues
deprecatedPackage has not been updated since 2021; may rely on outdated dependencies.
fix
Consider migrating to a maintained auth library like Passport.js directly or using Identity platforms.
affects: >=1.0.0
gotchaBreweryAuth class requires all config properties; missing properties may cause silent failures.
fix
Ensure all environment variables are set or provide defaults.
affects: >=1.0.0
breakingVersion 1.2 changed the config structure; salt field added and tokenSecret renamed.
fix
Update config to include salt and use tokenSecret instead of previous secret key.
affects: >=1.2.0 <1.3.0
Errors
Common errors & fixes
TypeError: BreweryAuth is not a constructor
Importing as named instead of default in CJS.
fix
Use const BreweryAuth = require('brewery-auth');
Cannot find module 'brewery-auth'
Package not installed or name misspelled.
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).
Error: ENOENT: no such file or directory, open '...'
Missing configuration file or environment variable.
fix
Ensure .env file exists and contains all required variables.
Upgrade
Version history
1.2.20latest on npm
Audit
Dependencies
passportrequiredCore authentication middleware
Agent activity
39 hits · last 30 days
node
32
OpenAI (training)
1
Resources
brewery-auth-test — npm install brewery-auth-test · libregistry