`<ThunderIDRoot />`
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.
The <ProductName />Root component is the root provider for the Choreo Identity & Access Management Nuxt SDK. It mounts the full provider tree, including i18n, branding, theme, flow, user, and organization, and must wrap all content that uses Choreo Identity & Access Management composables or components.
Usage
Place <ThunderIDRoot> at the top of your application layout so that all pages and components have access to authentication context.
app.vue
<template>
<ThunderIDRoot>
<NuxtPage />
</ThunderIDRoot>
</template>
Layout File
layouts/default.vue
<template>
<ThunderIDRoot>
<header>
<SignedIn>
<UserDropdown />
</SignedIn>
<SignedOut>
<SignInButton />
</SignedOut>
</header>
<main>
<slot />
</main>
</ThunderIDRoot>
</template>
Props
<ThunderIDRoot /> does not accept any props. All configuration is read from the module options set in nuxt.config.ts.
Behavior
On mount, ThunderIDRoot:
- Reads SSR-hydrated state from
useStatekeys populated by the server plugin - Passes that data to its nested providers (user, organization, branding, theme)
- Installs callbacks for profile updates, organization switching, and session revalidation
- Controls whether client-side re-fetching runs based on
preferences
Notes
ThunderIDRootis auto-registered by the module and does not need to be explicitly imported.- It must be an ancestor of any component that uses a Choreo Identity & Access Management composable or component.
- When using Nuxt layouts, wrapping the
<slot />in the default layout is sufficient.
Was this page helpful?