API reference
Full referenceFunctions
function
<ThunderIDProvider />The
ThunderIDProvider is a React Server Component that initializes ThunderID authentication and wraps your application layout. It manages server-side session state and provides authentication context to all child components.Props
childrenReactNode**Required.** Your application tree
sessionCookieExpiryTimenumberSession cookie lifetime in seconds. Also configurable via the `THUNDERID_SESSION_COOKIE_EXPIRY_TIME` environment variable
Example
import { ThunderIDProvider } from '@thunderid/nextjs/server'export default function RootLayout({children,}: {children: React.ReactNode}) {return (<html lang="en"><body><ThunderIDProvider>{children}</ThunderIDProvider></body></html>)}
Get started
Provider, session, and a protected route, start to finish.
Connect your application
Getting started / Connect your application / Next.js
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.