Flow Meta (V2)
getFlowMetaV2 fetches aggregated metadata for a V2 flow context — including application branding, organization unit details, theme configuration, and available translations. Use it to pre-load everything needed to render a custom sign-in or sign-up UI.
getFlowMetaV2(config)
import { getFlowMetaV2, FlowMetaType } from '@thunderid/javascript'
const meta = await getFlowMetaV2({
baseUrl: 'https://localhost:8090',
type: FlowMetaType.App,
id: '<your-app-id>',
language: 'en-US',
})
console.log(meta.application?.name)
console.log(meta.design.theme.colorSchemes)
console.log(meta.i18n.translations)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
config.url | string | ✅ | Full endpoint URL. Mutually exclusive with baseUrl |
config.baseUrl | string | ✅ | ThunderID base URL |
config.type | FlowMetaType | — | Scope the metadata to an application (App) or organization unit (Ou) |
config.id | string | — | Application ID or OU ID, depending on type |
config.language | string | — | BCP 47 language tag for the i18n metadata (e.g., 'en-US') |
config.namespace | string | — | Translation namespace filter |
Response: FlowMetadataResponse
| Property | Type | Description |
|---|---|---|
application | ApplicationMetadata | Application details (name, logo, links). Present when type is App |
ou | OUMetadata | Organization unit details. Present when type is Ou |
design | DesignMetadata | Theme and layout configuration |
i18n | I18nMetadata | Available translations and language list |
isRegistrationFlowEnabled | boolean | Whether self-registration is enabled |
ApplicationMetadata
| Property | Type | Description |
|---|---|---|
id | string | Application UUID |
name | string | Application display name |
url | string | Application home URL |
logoUrl | string | Application logo URL |
policyUri | string | Privacy policy URL |
tosUri | string | Terms of service URL |
OUMetadata
| Property | Type | Description |
|---|---|---|
id | string | Organization unit UUID |
name | string | Organization unit name |
handle | string | Organization handle (URL-safe identifier) |
description | string | Organization description |
logoUrl | string | Organization logo URL |
policyUri | string | Privacy policy URL |
tosUri | string | Terms of service URL |
cookiePolicyUri | string | Cookie policy URL |
DesignMetadata
| Property | Type | Description |
|---|---|---|
theme | FlowMetaTheme | Theme configuration |
layout | object | Layout configuration |
FlowMetaTheme
| Property | Type | Description |
|---|---|---|
colorSchemes | Record<string, FlowMetaThemeColorScheme> | Named color scheme variants |
defaultColorScheme | string | Default color scheme name ('light' or 'dark') |
direction | 'ltr' | 'rtl' | Text direction |
shape | FlowMetaThemeShape | Border radius configuration |
typography | FlowMetaThemeTypography | Font family and size configuration |
FlowMetaThemeColorScheme
| Property | Type | Description |
|---|---|---|
background | FlowMetaThemeBackground | Page and surface background colors |
colors | FlowMetaThemeColors | Primary, secondary, and semantic colors |
text | FlowMetaThemeTextColors | Foreground text colors |
FlowMetaThemeColors
| Property | Type | Description |
|---|---|---|
primary | FlowMetaThemeColorSet | Primary brand color (main, dark, contrastText) |
secondary | FlowMetaThemeColorSet | Secondary brand color |
I18nMetadata
| Property | Type | Description |
|---|---|---|
language | string | Active language for the response |
languages | string[] | All supported language codes |
translations | Record<string, string> | Translation key-value pairs for the active language |
totalResults | number | Total number of available translation keys |
Enum
FlowMetaType
| Value | Description |
|---|---|
App | Scope metadata to a specific application |
Ou | Scope metadata to a specific organization unit |