Skip to content

User Settings

NuxtBase ships a user settings area at /dashboard/settings.

It is split into two practical sections:

  • profile
  • security

The profile card supports:

  • avatar upload
  • display name update
  • email change with verification

Avatar upload goes through /api/users/avatar, while name and email updates use Better Auth client actions.

Changing email is not an instant field update.

The shipped flow is:

  1. user enters a new email address
  2. app requests an email change through Better Auth
  3. verification email is sent
  4. callback returns to /dashboard/settings?emailChange=verified
  5. settings page shows a success state and clears the pending email-change message

That means working email delivery still matters inside settings, not only during sign-up.

Password behavior depends on linked account state.

If the user already has a credential account, settings shows a change password flow. If the user signed up through OAuth only, settings can show a set password flow instead.

The credential flow also supports revoking other sessions after a password change.

The settings security area includes a full TOTP setup and disable flow.

The current UX supports:

  • QR code setup
  • manual secret copy
  • backup codes
  • verification before enabling
  • role-appropriate disable flows

One useful implementation detail:

  • users with a password account can confirm with password
  • OAuth-only users disabling 2FA confirm with a TOTP code instead

Passkeys are managed directly from settings.

Users can:

  • add a passkey
  • choose authenticator attachment preference
  • rename an existing passkey
  • remove a passkey

The UI also shows when each passkey was created.

  1. upload a new avatar
  2. change the display name
  3. start an email change and complete the verification link
  4. change or set a password depending on the account type
  5. enable 2FA and save backup codes
  6. register, rename, and remove a passkey