import React from 'react' import { type Meta } from '@storybook/react-vite' import { DocsTemplate } from '../../../.storybook' export const Example = (): React.JSX.Element => { return (

exchangeGlobalToken is an async helper function that exchanges an Auth0 id token with the adminczar global token exchange endpoint.

This function allows all frontend applications to reuse the same global token exchange logic without redirecting users to the Admin frontend application.

Note: This function makes an API call and cannot be demonstrated interactively in Storybook.

) } Example.storyName = 'exchangeGlobalToken' export default { title: 'Helper Functions/exchangeGlobalToken', component: Example, parameters: { viewMode: 'docs', previewTabs: { canvas: { hidden: true }, }, docs: { page: () => ( <> Parameters: , Response (TokenExchangeResponse): , Error handling: , Common usage pattern: , Compatible applications: Note: pxm and pi apps use server-side authentication and cannot use this helper. , ]} /> ), }, }, } as Meta