Meta package for auth-strategy-manager that installs the core package by default. Version 2.0.2 ships bundled TypeScript types, supports Node.js and browser environments with ESM and CJS exports. It provides a unified strategy-based authentication and authorization abstraction layer, simplifying integration of multiple auth providers (e.g., JWT, OAuth, API keys) behind a consistent interface. Key differentiators include zero-config core setup via the meta package, first-class TypeScript support, and a plugin-style strategy architecture that avoids runtime dependencies beyond the core.
npm install auth-strategy-managerVerified import paths — ran on the pinned version, not inferred.
Initializes the Auth Strategy Manager, registers a JWT strategy with secret from environment variable, and authenticates a token.
Replace 'auth-manager-core' with '@auth-strategy-manager/core' in imports and package.json dependencies.
Use import syntax. For CJS environments, use dynamic import: const { AuthStrategyManager } = await import('@auth-strategy-manager/core');Replace 'algorithm: 'HS256'' with 'algorithms: ['HS256']'.
Import directly from '@auth-strategy-manager/core' for any symbols.
Run: npm install @auth-strategy-manager/core
Ensure you import AuthStrategyManager from '@auth-strategy-manager/core', not from 'auth-strategy-manager'.
Use import statement or dynamic import: const { AuthStrategyManager } = await import('@auth-strategy-manager/core');