How thunder-id/javascript-sdks works
ThunderID JavaScript SDKs provide authentication and user-management capabilities across browser, Node.js, and web-framework applications. The principal workflow is an application initiating sign-in or sign-up, the relevant SDK handling an embedded or redirect-based flow and OAuth callback, and the client receiving session/token and user data. Framework packages add UI, route protection, or server-side session handling. Package-level relationships reflect the README and sampled imports; several unsampled package internals are represented only at their enclosing source paths.
Main entry points: ThunderIDBrowserClient.ts Browser client · ThunderIDNextClient.ts Next.js SDK · ThunderIDJavaScriptClient.ts JavaScript client · api Auth flows
Components 22
Core SDK
- JavaScript client
packages/javascript/src/ThunderIDJavaScriptClient.ts - Auth flows
packages/javascript/src/api - User APIs
packages/javascript/src/api - Storage manager
packages/javascript/src/StorageManager.ts
Runtime clients
- Browser client
packages/browser/src/ThunderIDBrowserClient.ts - Browser stores
packages/browser/src/stores - Node client
packages/node/src/ThunderIDNodeClient.ts
Framework integrations
- React SDK
packages/react/src/ThunderIDReactClient.ts - React components
packages/react/src/components - OAuth callback
packages/react/src/hooks/useOAuthCallback.ts - Vue SDK
packages/vue/src/ThunderIDVueClient.ts - Vue callback
packages/vue/src/composables/useOAuthCallback.ts - React Router
packages/react-router/src/components
Server integrations
- Next.js SDK
packages/nextjs/src/ThunderIDNextClient.ts - Session manager
packages/nextjs/src/utils/SessionManager.ts - Server actions
packages/nextjs/src/server/actions - Nuxt SDK
packages/nuxt/src/runtime - Nuxt auth routes
packages/nuxt/src/runtime/server/routes/auth/session - Express middleware
packages/express/src/middleware - Better Auth helper
packages/better-auth/src
Other components
- Application
- ThunderID service
Connections 32
- Application → Browser client: starts auth
- Application → React components: uses UI
- Application → Server actions: invokes actions
- Application → Nuxt SDK: uses module
- Application → Express middleware: configures middleware
- Application → React Router: uses routes
- Browser client → JavaScript client: extends client
- Node client → JavaScript client: extends client
- React SDK → Browser client: extends client
- Vue SDK → Browser client: extends client
- Next.js SDK → Node client: extends client
- JavaScript client → Storage manager: reads and writes
- Browser client → Browser stores: uses stores
- JavaScript client → Auth flows: executes flows
- JavaScript client → User APIs: requests user data
- Auth flows → ThunderID service: submits auth requests
- User APIs → ThunderID service: requests profile data
- React components → OAuth callback: handles callback
- OAuth callback → Auth flows: submits code
- Vue SDK → Vue callback: uses callback
- Vue callback → Auth flows: submits code
- Next.js SDK → Auth flows: executes embedded flow
- Next.js SDK → User APIs: fetches user data
- Next.js SDK → Session manager: signs session tokens
- Server actions → Next.js SDK: calls client
- Server actions → Session manager: manages sessions
- Session manager → Node client: uses cookie config
- Nuxt SDK → Nuxt auth routes: dispatches auth routes
- Nuxt auth routes → ThunderID service: handles auth requests
- Express middleware → Node client: uses runtime client
- React Router → Browser client: integrates client
- Better Auth helper → ThunderID service: provider integration