Skip to main content

Express

Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

Middleware to protect Express routes and APIs with Choreo Identity & Access Management.

API reference​

Every export is fully typed. The signatures and props below come from the package's own reference documentation, so what is listed here is what the installed version ships.

See the full API reference for every export, its signature and an example.

Middleware​

  • ThunderID Middleware (middleware): The thunderID() function returns Express middleware that initializes a ThunderIDExpressClient and attaches it to both req.thunderIDAuth and res.thunderIDAuth.

  • handleFlow() (middleware): The handleFlow() function returns an Express route handler that advances the embedded sign-in flow and responds with JSON.

  • handleSignIn() (middleware): The handleSignIn() function returns an Express route handler for the sign-in path.

  • handleSignOut() (middleware): The handleSignOut() function returns an Express route handler for the sign-out path.

  • protect() (middleware): The protect() function returns Express middleware that blocks unauthenticated requests.

Client​

  • ThunderIDExpressClient (class): ThunderIDExpressClient is the Express-aware client class exported by @thunderid/express.

Configuration​

  • ExpressClientConfig (export): ExpressClientConfig is the main configuration type for @thunderid/express.

Constants​

  • CookieConfig (export): The Express SDK exports CookieConfig and SESSION_COOKIE_NAME for the session cookie behavior used by the SDK.

Get started​

Provider, session, and a protected route, start to finish.

Connect your application: Getting started / Connect your application / Express

The quickstart is maintained alongside the rest of the getting-started guides so it stays in step with the platform. This page covers the package itself.

Guides​

Task-focused walkthroughs maintained alongside the SDK.

  • Embedded Sign-In: Drive the Express embedded sign-in flow with handleFlow() for JSON-based multi-step authentication.

  • Redirect Flow: Build the standard Express sign-in and protected-route flow using redirect-based OAuth 2.0 PKCE.

Was this page helpful?