Node.js SDK
The ThunderID Node.js SDK (@thunderid/node) provides authentication and session management for server-side Node.js applications. The SDK implements the OAuth 2.0 Authorization Code flow with PKCE and supports multi-user session management.
Installation
Install the ThunderID Node.js SDK using your preferred package manager:
npm
Yarn
pnpm
Bun
npm install @thunderid/node
yarn add @thunderid/node
pnpm add @thunderid/node
bun add @thunderid/node
Next Steps
To integrate the SDK into your application, start with the Handling Authentication guide, which walks you through client setup, the sign-in flow, and sign-out. Then explore:
- Protecting Routes: Restrict access based on session state
- Accessing Protected APIs: Call downstream APIs with the access token
Features
Clients
The SDK provides authentication clients designed for server-side Node.js applications.
ThunderIDNodeClient: Abstract base class for building Node.js framework integrations
Configuration
ThunderIDNodeConfig: Configuration type for the Node.js SDK
Utilities
Helper functions and constants for session and cookie management.
CookieConfig: Default cookie configuration constantsCookieOptions: Cookie configuration interfacegenerateSessionId(): Generate unique session identifiersgetSessionCookieOptions(): Build cookie options with defaults applied