{"id":18288,"library":"egg-gymbo-auth","title":"egg-gymbo-auth","description":"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.","status":"maintenance","version":"1.3.9","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","egg","eggPlugin","egg-plugin"],"install":[{"cmd":"npm install egg-gymbo-auth","lang":"bash","label":"npm"},{"cmd":"yarn add egg-gymbo-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add egg-gymbo-auth","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package name is 'egg-gymbo-auth', not 'egg-gymboree-auth'. The plugin is configured in config/plugin.js as shown.","wrong":"exports.gymboAuth = {\n  enable: true,\n  package: 'egg-gymboree-auth',\n};","symbol":"default (plugin)","correct":"exports.gymboAuth = {\n  enable: true,\n  package: 'egg-gymbo-auth',\n};"},{"note":"The middleware is not a direct import; it is accessible via app.middleware after enabling the plugin.","wrong":"const gymboAuth = require('egg-gymbo-auth');","symbol":"middleware","correct":"app.middleware.gymboAuth(ctx, next);"},{"note":"Configuration is done via Egg's config object, not by importing the package directly.","wrong":"const config = require('egg-gymbo-auth');","symbol":"config","correct":"// config/config.default.js\nexports.gymboAuth = {\n  secret: 'your-secret',\n};"}],"quickstart":{"code":"// config/plugin.js\nexports.gymboAuth = {\n  enable: true,\n  package: 'egg-gymbo-auth',\n};\n\n// config/config.default.js\nexports.gymboAuth = {\n  secret: process.env.AUTH_SECRET || 'default-secret',\n  ignore: ['/login', '/register'],\n};\n\n// app/router.js\nmodule.exports = app => {\n  const { router, controller, middleware } = app;\n  router.get('/protected', middleware.gymboAuth(), controller.home.protected);\n  router.get('/login', controller.home.login);\n};\n\n// app/controller/home.js\nexports.protected = async ctx => {\n  ctx.body = { message: 'Authenticated', user: ctx.state.user };\n};\nexports.login = async ctx => {\n  // dummy login\n  ctx.body = { token: 'fake-token' };\n};","lang":"javascript","description":"Shows how to enable the plugin, configure it, and apply the middleware to a route."},"warnings":[{"fix":"Upgrade to Egg 2.x and use a compatible auth plugin.","message":"This plugin only supports Egg 1.x, not Egg 2.x or later.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install with 'npm install egg-gymbo-auth'.","message":"The package name is 'egg-gymbo-auth', but the README header says 'egg-gymboree-auth'. Ensure you install the correct package.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use Node.js 10+ or later.","message":"Node.js >=8.0.0 required, but Node 8 is end-of-life. Consider upgrading Node version.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install egg-gymbo-auth' and check spelling in plugin.js.","cause":"Package not installed or name misspelled.","error":"Error: Cannot find module 'egg-gymbo-auth'"},{"fix":"Ensure plugin is enabled in config/plugin.js and that the plugin has been loaded (check if it requires Egg 1.x).","cause":"Plugin not enabled or middleware not registered correctly.","error":"TypeError: app.middleware.gymboAuth is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}