Security Settings
better-auth-ui/security-settingsFreeComponent
A container component that displays security settings including password management, linked accounts, plugin-contributed security cards (e.g. passkeys), active sessions, and danger zone.
Live preview
live · rendered by the registry
Rendered by better-auth-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://better-auth-ui.com/r/security-settings.jsonSource
1"use client"23import { useAuth } from "@better-auth-ui/react"4import { cn } from "@/lib/utils"5import { ActiveSessions } from "./active-sessions"6import { ChangePassword } from "./change-password"7import { LinkedAccounts } from "./linked-accounts"89export type SecuritySettingsProps = {10 className?: string11}1213/**14 * Renders the security settings layout including password management, linked accounts, and active sessions.15 *16 * ChangePassword is rendered when password authentication is enabled; LinkedAccounts is rendered when social providers are present.17 * Each registered auth plugin may contribute `securityCards` (for example passkeys, delete-user).18 *19 * @param className - Optional additional CSS class names for the outer container.20 * @returns The security settings container as a JSX element.21 */22export function SecuritySettings({ className }: SecuritySettingsProps) {23 const { emailAndPassword, plugins, socialProviders } = useAuth()2425 return (26 <div className={cn("flex w-full flex-col gap-4 md:gap-6", className)}>27 {emailAndPassword?.enabled && <ChangePassword />}28 {!!socialProviders?.length && <LinkedAccounts />}29 <ActiveSessions />30 {plugins.flatMap(31 (plugin) =>32 plugin.securityCards?.map((Card, index) => (33 <Card key={`${plugin.id}-${index.toString()}`} />34 )) ?? []35 )}36 </div>37 )38}
What it pulls in
npm packages
Other registry items
Files it writes
More from better-auth-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Settingsaccount-settings | better-auth-ui | Components | Free | 2 deps | |
| Active Sessionsactive-sessions | better-auth-ui | Components | Free | 5 deps · 2 files | |
| Additional Fieldadditional-field | better-auth-ui | Components | Free | 5 deps | |
| Adminadmin | better-auth-ui | Components | Free | 4 deps · 3 files | |
| Anonymousanonymous | better-auth-ui | Components | Free | 4 deps · 3 files | |
| API Keyapi-key | better-auth-ui | Components | Free | 4 deps · 10 files | |
| Authauth | better-auth-ui | Components | Free | 2 deps | |
| Auth Providerauth-provider | better-auth-ui | Components | Free | 4 deps · 2 files |
