-
Network is disabled in unit tests.
test/setup.jscallsnock.disableNetConnect()(localhost allowed). Any code path that makes an outbound HTTP call will fail a unit test unless you register anockinterceptor. Stub the OIDC discovery/JWKS/token endpoints rather than hitting the network. -
index.d.tsis hand-written and drifts. It is not generated from the JS. When you add or change a config option (lib/config.js) or an export (index.js), updateindex.d.tsin the same PR and runnpm run test:types—tsdwill catch mismatches againstindex.test-d.ts. -
Config options are validated by Joi, with defaults. Reading config directly or forgetting to add a schema rule in
lib/config.jsmeans the option is silently dropped (Joi strips unknown keys where.unknown(true)isn't set) or missing its default. Declare every new option in the schema. -
lib/context.jsis large and central. Most login/callback/session behavior flows through it. Changes here have wide blast radius; add targeted unit tests and prefer surgical edits. -
Cookie/session format is a compatibility surface.
lib/appSession.js+lib/crypto.jsencrypt the session cookie. Changing the format, encryption, or cookie flags can invalidate existing user sessions — treat as a breaking change (Ask First). -
response_typedrives PKCE andresponse_modedefaults. The default flow isid_token(Implicit + Form Post). Whenresponse_typeincludescode, PKCE and differentresponse_modevalidation apply (lib/config.js). Don't assume Authorization Code semantics for the default config. -
Telemetry must ride the shared fetch wrapper. New outbound OIDC requests should go through
createCustomFetch(lib/client.js) so they carry theAuth0-Clientheader andUser-Agent; a hand-rolled client bypasses telemetry and theenableTelemetryopt-out. -
Two npm-release paths exist. Releases are cut via the release workflows; don't bump versions or edit
CHANGELOG.mdby hand as part of a feature change. Keep.versionandpackage.json"version"in sync when a version does change.