| 1 | "use client"; |
| 2 | |
| 3 | import { useAuth } from |
| 4 | import { cn } |
| 5 | import { ActiveSessions } |
| 6 | import { ChangePassword } |
| 7 | import { GpgKeys } |
| 8 | import { LinkedAccounts } |
| 9 | import { SshKeys } |
| 10 | |
| 11 | export type SecuritySettingsProps |
| 12 | className?: string |
| 13 | }; |
| 14 | |
| 15 | /** Renders the security settings layout including password management, linked accounts, and active sessions. */ |
| 16 | export function SecuritySettings({ |
| 17 | const { emailAndPassword, |
| 18 | |
| 19 | return ( |
| 20 | <div className={cn |
| 21 | {emailAndPassword?.enabled && |
| 22 | {!!socialProviders?.length && |
| 23 | <SshKeys /> |
| 24 | <GpgKeys /> |
| 25 | <ActiveSessions /> |
| 26 | {plugins.flatMap( |
| 27 | (plugin) => |
| 28 | plugin.securityCards?.map |
| 29 | <Card key={ |
| 30 | )) ?? [], |
| 31 | )} |
| 32 | </div> |
| 33 | ); |
| 34 | } |