Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Settings

Security settings

A security page led by a checkup ring, then password change with a strength meter, two-factor methods, signed-in devices, and a separate danger zone.

bunx --bun @getweini/cli@latest add alert alert-dialog badge button card password-input switch
Customize
  • The settings shell (workspace header, grouped section nav with `aria-current`, and the back link) is identical across the four settings blocks, so the pages read as one product. Its labels live in `copy.nav`; it becomes a scrolling row of sections below 1024px.
  • The checkup ring counts three steps from your props: a password (always set), `twoFactor`, and no more than two signed-in devices. Change the steps in the `steps` computed value.
  • The block is controlled. `sessions` and `twoFactor` are data props; it emits `change-password`, `toggle-two-factor`, `sign-out` with the session id, and `sign-out-all`. Update your props when each request finishes.
  • Set `loading` while the password request runs and `error` with its message. `passwordChanged` shows the success message and clears the fields. The strength meter is a rough length and character-mix guide, not an entropy check; replace it with your own scorer if you have one.
  • The current device is marked with `current: true` and has no sign-out button. Signing out everywhere asks for confirmation in an `AlertDialog` that focuses Cancel first.
  • Password fields validate length and match after blur or a failed submit, and focus moves to the first invalid field. Every visible string lives in `copy`.