Components · Reference
OrganizationAccessRequired
Explain that a visitor needs access to an organization.
Preview
Loading preview…
Usage
tsx
import { OrganizationAccessRequired } from "@krak-stack/auth/organization-access-required/react";
export const Example = ({
organizationName,
contactEmail,
}: {
organizationName: string;
contactEmail: string;
}) => (
<OrganizationAccessRequired
organizationName={organizationName}
contactEmail={contactEmail}
signInHref="/sign-in"
/>
);
The Effect UI view accepts a host-provided accountEmail, or can read it through its session query when loadSession is enabled. Handle SwitchRequested in the host and pass switchStatus back to show pending or failed sign-out.
Render this screen after your application determines that the visitor lacks access. Supply organizationName and optionally a contact address, sign-in URL, or app-specific actions. The screen itself does not check access.