Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Settings/Security from ./settings-security.
import { SettingsSecurityScreen } from "@/components/ui/settings-security";
export default function Page() {
return (
<SettingsSecurityScreen
security={settings}
onSave={(security) => saveSecurity(security)}
onVerifyDomain={(domain) => api.checkTxtRecord(domain)}
onSignOutAll={() => api.revokeSessions()}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| security | SecurityValues | Domains, join by domain, SSO, metadata URL, two-step verification, session length and IP ranges – the sample workspace when left out | |
| onSave | (security: SecurityValues) => void | Called with all settings whenever something changes – switches and lists at once, the metadata URL on blur | |
| onVerifyDomain | (domain: string) => Promise<boolean> | Checks the domain's TXT record; resolve true once it is found. The demo waits a moment and says yes | |
| onSignOutAll | () => void | Called once signing everyone out is confirmed | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| workspace | string | Workspace name in the sidebar | |
| user | { name: string; avatar?: string } | Account at the bottom of the sidebar | |
| loading | boolean | While the settings load: the domains, switches, session length, identity provider and IP ranges as gray shapes in the shape of the real ones | |
| empty | boolean | Nothing set up yet: “No domains yet” with Add domain and “No IP ranges” with Add range in the lists' place; SSO and joining stay off | |
| className | string | Extra class on the root |
Fills its container – give it the full viewport height in your app
Below 600px each control moves under its label; switches and the domain rows stay on one line
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"; colors are CSS variables on .ui-as