UNPKG

@wristband/express-auth

Version:

SDK for integrating your ExpressJS application with Wristband. Handles user authentication, session management, and token management.

31 lines (30 loc) 1.24 kB
import { WristbandError } from './error'; import { createWristbandAuth, discoverWristbandAuth } from './factory'; /** * Public auth exports */ export { createWristbandAuth, discoverWristbandAuth, WristbandError, }; /** * Session middleware export * * NOTE: This export uses inline re-export syntax to ensure the session module * is only loaded when explicitly imported. This prevents the Express.Request type * augmentation from being applied to users who only use auth features without session * middleware, avoiding type conflicts with other session libraries. * * When imported, this automatically augments Express.Request with the `session` property. */ export { createWristbandSession } from './session'; /** * Session error class exports * * ⚠️ WARNING: These are runtime value exports. Importing them will load the * @wristband/typescript-session module and trigger Express.Request augmentation. * * Only import these if you're using createWristbandSession() middleware. */ export { SessionError, SessionErrorCode } from '@wristband/typescript-session'; /** * Re-export JWT validator factory from typescript-jwt (runtime value) */ export { createWristbandJwtValidator } from '@wristband/typescript-jwt';