Skip to main content

`<ThunderIDProvider />`

Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

The ThunderIDProvider is the root provider component that configures @thunderid/vue and provides Choreo Identity & Access Management context to your entire Vue application. It must wrap your application to enable authentication features.

Overview​

The <ProductName />Provider initializes the Choreo Identity & Access Management authentication client, manages authentication state, and provides context to descendant components through Vue's provide/inject API. It handles token management, user sessions, organization switching, and branding preferences automatically.

Usage​

The ThunderIDProvider must be used at the root of your Vue application to ensure that all components have access to authentication features. After installing the ThunderIDPlugin, the component is registered globally and can be used without explicit imports.

Basic Usage​

A minimal setup involves wrapping your root component with <ThunderIDProvider /> and providing the required client-id and base-url props.

src/App.vue
<template>
<ThunderIDProvider
client-id="<your-app-client-id>"
base-url="https://<DATA_PLANE_URL>"
>
<router-view />
</ThunderIDProvider>
</template>

Advanced Usage​

For more advanced configurations, you can provide additional props such as:

  • scopes: Specifies the OpenID Connect scopes to request during sign-in.
  • afterSignInUrl: URL to redirect to after successful sign-in.
  • afterSignOutUrl: URL to redirect to after sign-out.
  • signInOptions: Additional sign-in options forwarded to the client.

For a complete list of props, refer to the Props section below.

src/App.vue
<script setup>
const scopes = [
'openid',
'profile',
'internal_login',
'internal_organization_create',
'internal_organization_view',
'internal_organization_update',
'internal_organization_delete',
]
</script>

<template>
<ThunderIDProvider
client-id="<your-app-client-id>"
base-url="https://<DATA_PLANE_URL>"
:scopes="scopes"
after-sign-in-url="/dashboard"
after-sign-out-url="/home"
>
<router-view />
</ThunderIDProvider>
</template>
tip

Vue prop names are kebab-cased in templates and camelCased in JavaScript. For example, the afterSignInUrl prop is written as after-sign-in-url when used in a template.

Props​

The ThunderIDProvider component accepts the following props:

PropTypeRequiredDescription
clientIdstring✅Client ID of your application
baseUrlstring✅The base URL of the Choreo Identity & Access Management instance (e.g., https://<DATA_PLANE_URL>)
applicationIdstring❌The Choreo Identity & Access Management application ID
afterSignInUrlstring❌URL to redirect to after sign-in completes. Defaults to window.location.origin.
afterSignOutUrlstring❌URL to redirect to after sign-out completes. Defaults to window.location.origin.
scopesstring[]❌OpenID Connect Scopes to request during sign-in. Defaults to 'openid profile internal_login' if not provided.
signInUrlstring❌Custom sign-in URL. When set, <SignInButton /> navigates to this URL instead of triggering the embedded flow.
signUpUrlstring❌Custom sign-up URL. When set, <SignUpButton /> navigates to this URL instead of triggering the embedded flow.
signInOptionsSignInOptions❌Additional sign-in options forwarded to the underlying client.
storage'sessionStorage' | 'localStorage' | 'webWorker'❌Storage mechanism for session management. Defaults to sessionStorage.
instanceIdnumber❌Instance ID for multi-instance support. Defaults to 0.
organizationHandlestring❌The organization handle.
organizationChainobject❌Organization chain configuration.
platformstring❌Platform type. Use 'ThunderIDV2' to enable V2 embedded flow features.
sessionSessionConfig❌Behaviour around the Choreo Identity & Access Management session. Set session.silentSignIn.beforeRedirect to true to try a silent sign-in before signIn() redirects. The silent attempt is skipped when the sign-in options set their own prompt. session.silentSignIn.timeout (milliseconds, default 10000) bounds how long a silent sign-in waits. See Browser configuration.

Was this page helpful?