<OrganizationProfile /> component

The <OrganizationProfile /> component is used to render a beautiful, full-featured organization management UI that allows users to manage their organization profile and security settings.

This component's General tab displays the organization's information and the Leave organization button. Admins will be able to see the Update profile button, Verified domains section, and Delete organization button.

The Members tab shows the organization's members along with their join dates and roles. Admins will have the ability to invite a member, change a member's role, or remove them from the organization. Admins will have tabs within the Members tab to view the organization's invitations and requests.

Properties

All props are optional.


appearance Appearance | undefined

Optional object to style your components. Will only affect OneAuxilia components and not Account Portal pages.


afterLeaveOrganizationUrl string

Full URL or path to navigate to after leaving an organization.


routing 'hash' | 'path' | 'virtual'

The routing strategy for your pages. Defaults to 'path' in Next.js and Remix applications. Defaults to hash for all other SDK's.


path string

The path where the component is mounted on when routing is set to path. It is ignored in hash- and virtual-based routing. For example: /organization-profile.


customPages CustomPages[]

An array of custom pages to add to the organization profile. Only available for the JavaScript SDK. To add custom pages with React-based SDK's, see the dedicated guide.

Usage with frameworks

You can embed the <OrganizationProfile /> component using the Next.js optional catch-all route. This allows you to redirect the user inside your application.

App Router

/app/organization-profile/[[...organization-profile]]/page.tsx
import { OrganizationProfile } from '@oneauxilia/nextjs'

export default function OrganizationProfilePage() {
  return <OrganizationProfile path="/organization-profile" />
}

Pages Router

/pages/organization-profile/[[...index]].tsx
import { OrganizationProfile } from '@oneauxilia/nextjs'

export default function OrganizationProfilePage() {
  return <OrganizationProfile path="/organization-profile" />
}

Usage with JavaScript

The following methods available on an instance of the OneAuxilia class are used to render and control the <OrganizationProfile /> component:

  • mountOrganizationProfile()

  • unmountOrganizationProfile()

  • openOrganizationProfile()

  • closeOrganizationProfile()

The following examples assume that you have followed the quickstart in order to add OneAuxilia to your JavaScript application.

mountOrganizationProfile()

Render the <OrganizationProfile /> component to an HTML <div> element.

function mountOrganizationProfile(node: HTMLDivElement, props?: OrganizationProfileProps): void

mountOrganizationProfile() params


node HTMLDivElement

The <div> element used to render in the <OrganizationProfile /> component


props? OrganizationProfileProps

The properties to pass to the <OrganizationProfile /> component

mountOrganizationProfile() usage

main.js
import { OneAuxilia } from '@oneauxilia/oneauxilia-js'

// Initialize OneAuxilia with your OneAuxilia publishable key
const oneauxiliaPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY

const oneauxilia = new OneAuxilia(oneauxiliaPubKey)
await oneauxilia.load()

document.getElementById('app').innerHTML = `
  <div id="organization-profile"></div>
`

const orgProfileDiv = document.getElementById('organization-profile')

oneauxilia.mountOrganizationProfile(orgProfileDiv)

unmountOrganizationProfile()

Unmount and run cleanup on an existing <OrganizationProfile /> component instance.

function unmountOrganizationProfile(node: HTMLDivElement): void

unmountOrganizationProfile() params


node HTMLDivElement

The container <div> element with a rendered <OrganizationProfile /> component instance.

unmountOrganizationProfile() usage

main.js
import { OneAuxilia } from '@oneauxilia/oneauxilia-js'

// Initialize OneAuxilia with your OneAuxilia publishable key
const oneauxiliaPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY

const oneauxilia = new OneAuxilia(oneauxiliaPubKey)
await oneauxilia.load()

document.getElementById('app').innerHTML = `
  <div id="organization-profile"></div>
`

const orgProfileDiv = document.getElementById('organization-profile')

oneauxilia.mountOrganizationProfile(orgProfileDiv)

// ...

oneauxilia.unmountOrganizationProfile(orgProfileDiv)

openOrganizationProfile()

Opens the <OrganizationProfile /> component as an overlay at the root of your HTML body element.

function openOrganizationProfile(props?: OrganizationProfileProps): void

openOrganizationProfile() params


props? OrganizationProfileProps

The properties to pass to the <OrganizationProfile /> component

openOrganizationProfile() usage

main.js
import { OneAuxilia } from '@oneauxilia/oneauxilia-js'

// Initialize OneAuxilia with your OneAuxilia publishable key
const oneauxiliaPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY

const oneauxilia = new OneAuxilia(oneauxiliaPubKey)
await oneauxilia.load()

document.getElementById('app').innerHTML = `
  <div id="organization-profile"></div>
`

const orgProfileDiv = document.getElementById('organization-profile')

oneauxilia.openOrganizationProfile(orgProfileDiv)

closeOrganizationProfile()

Closes the organization profile overlay.

function closeOrganizationProfile(): void

closeOrganizationProfile() usage

main.js
import { OneAuxilia } from '@oneauxilia/oneauxilia-js'

// Initialize OneAuxilia with your OneAuxilia publishable key
const oneauxiliaPubKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY

const oneauxilia = new OneAuxilia(oneauxiliaPubKey)
await oneauxilia.load()

document.getElementById('app').innerHTML = `
  <div id="organization-profile"></div>
`

const orgProfileDiv = document.getElementById('organization-profile')

oneauxilia.closeOrganizationProfile(orgProfileDiv)

Last updated