<AsgardeoOrganization />
<AsgardeoOrganization> exposes the organization that the user is currently acting in to your template through a scoped slot, using the WSO2 Identity Server Nuxt SDK (@asgardeo/nuxt).
Overview¶
<AsgardeoOrganization> reads currentOrganization from useOrganization(). When the user is acting in an organization, it renders its default slot and passes the organization as the organization slot prop. Otherwise, it renders the fallback slot, or nothing if you don't provide one.
Note
<AsgardeoOrganization> must render inside <AsgardeoRoot>. It needs preferences.user.fetchOrganizations to be true, which is the default.
Usage¶
The component is auto-registered, so you don't need to import it.
<template>
<AsgardeoOrganization>
<template #default="{ organization }">
<p>Current organization: {{ organization.name }}</p>
</template>
<template #fallback>
<p>No organization selected.</p>
</template>
</AsgardeoOrganization>
</template>
Props¶
<AsgardeoOrganization> has no props.
Slots¶
| Slot | Slot props | Description |
|---|---|---|
default |
{ organization } |
Content to render when the user is acting in an organization. |
fallback |
– | Content to render when there's no current organization. |