Skip to main content

<Organization />

The Organization component is a declarative way to access the current organization object from the ThunderID authentication context. It uses a scoped slot to expose the organization data, making it easy to display organization information or conditionally render UI based on the active organization.

Usage

Basic Usage

Display organization information using a scoped slot:

src/OrgCard.vue
<script setup>
import { Organization } from '@thunderid/vue'
</script>

<template>
<Organization>
<template #default="{ organization }">
<div>
<h3>{{ organization.name }}</h3>
</div>
</template>
<template #fallback>
<p>No organization selected.</p>
</template>
</Organization>
</template>

Custom Fields

Use the scoped slot to render any field on the organization object:

src/OrgCard.vue
<script setup>
import { Organization } from '@thunderid/vue'
</script>

<template>
<Organization>
<template #default="{ organization }">
<div>
<h3>{{ organization.name }}</h3>
<p>ID: {{ organization.id }}</p>
</div>
</template>
</Organization>
</template>

Slots

SlotSlot PropsDescription
default{ organization }Rendered when a current organization is available. Receives the organization object.
fallbackRendered when no organization is selected.
ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© WSO2 LLC. All rights reserved.