Express
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): ThethunderID()function returns Express middleware that initializes aThunderIDExpressClientand attaches it to bothreq.thunderIDAuthandres.thunderIDAuth. -
handleFlow()(middleware): ThehandleFlow()function returns an Express route handler that advances the embedded sign-in flow and responds with JSON. -
handleSignIn()(middleware): ThehandleSignIn()function returns an Express route handler for the sign-in path. -
handleSignOut()(middleware): ThehandleSignOut()function returns an Express route handler for the sign-out path. -
protect()(middleware): Theprotect()function returns Express middleware that blocks unauthenticated requests.
Client
ThunderIDExpressClient(class):ThunderIDExpressClientis the Express-aware client class exported by@thunderid/express.
Configuration
ExpressClientConfig(export):ExpressClientConfigis the main configuration type for@thunderid/express.
Constants
CookieConfig(export): The Express SDK exportsCookieConfigandSESSION_COOKIE_NAMEfor 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?