Simple OAuth2 authentication server for the Cubic framework (v3.2.3). Provides JWT-based access and refresh tokens using RS256 signing by default. Integrates with cubic-api and cubic-core to verify users stored in the auth database. Key differentiators: built specifically for Cubic's ecosystem, supports cookie-based auth for web clients, and manages user logs. Not intended as a standalone auth server outside Cubic.
npm install cubic-authNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a Cubic auth server with custom API and core ports using CommonJS require.
Update cubic-api to v3.0.0 or later.
Provide valid RSA key strings for 'certPrivate' and 'certPublic' in production.
Ensure 'api' and 'core' options are plain objects with valid sub-options like 'server.port'.
Use valid ms string (e.g., '1h', '30m') for 'exp'.
Run 'npm install cubic-auth' and ensure it's in node_modules.
Use 'const cubic = new Cubic()' before calling 'cubic.use()'.
Set 'certPrivate' and 'certPublic' options with valid RSA key strings.