Skip to main content

Personal Account Settings

Audience: Support (engineers for the technical section) · Where in app: Sidebar → Settings → Account (and Notifications / Working Hours) · Plan availability: All plans

Personal account settings are everything a team member can change about their own profile — name, contact details, photo, password, sign-in methods, personal working hours, timezone, and notification preferences. These live on the member's own UserModel row.

What it does

  • Edit profile (name, phone, designation, location, photo, display name shown to visitors).
  • Change password (requires current password) or reset it via email.
  • Change email (confirmed by a one-time code to the new address).
  • Manage sign-in methods (email/password, Google, Apple).
  • Set personal working hours, timezone, and notification preferences.

How it works

Profile edits go through PUT /user/:_id. Security-sensitive changes have guardrails: a password change requires the current password; an email change sends a one-time code (OTP) to the new address which the user must enter to confirm. There is no first-party 2FA — teams that want it rely on Google/Apple SSO.

Configuration & options

Profile fields (UserModel)

  • first_name, last_name, phone, designation, location.
  • photo_file (current profile photo; photo is a legacy field).
  • Display name shown to visitors during chats/calls.

Password

  • Change: POST /auth/change-passwordrequires the current password (verified server-side).
  • Reset: POST /auth/forget-password emails a reset token (reset_password_token, ~1 hour TTL) → POST /auth/reset-password/:token.
  • Password complexity rules are configurable in admin settings.

Email change confirmation (flow)

  1. New email submitted → POST /change-email.
  2. A one-time code (OTP, ~1 hour TTL) is sent to the new address.
  3. User enters it → POST /user/otp-verification → email changed.

This prevents accidental lockouts and takeover via session hijack. (The OTP-to-new-address model is the implemented flow; it does not require the password.)

Sign-in methods

  • Email + password (primary).
  • Google OAuth (users.google_id; tokens in users.gtm_auth).
  • Apple Sign-In (users.apple_id) — mobile-oriented.
  • users.social_login flags accounts created via OAuth.

Personal working hours & timezone

  • users.working_hours overlays the org's working hours.
  • users.timezone (IANA) drives how times display in the dashboard.

Personal notification preferences

  • Email on new chat / new call, push on new chat/call, daily summary, notification sound (users.notification_tune).
  • A user-level toggle only fires when the company-level toggle allows it (org is the ceiling — see Organization Settings).

Behaviors & edge cases

  • Online status is user-controlled: availability (online_status: online/away/offline) is a manual toggle, not derived purely from working hours — see Team Management.
  • No self-serve account deletion: there is no "delete my account" button. Deletion is admin-only (DELETE /user/:_id, requires user_type === 'admin'); regular users must request it via support.
  • Owner can't self-delete: the company owner (web_owner) must transfer ownership before their account can be removed.
  • Password reset invalidates sessions: a reset/forces re-auth across sessions.
  • 2FA: not first-party — use Google/Apple SSO if MFA is required.
  • Photo precedence: a member's personal photo overrides any default agent avatar shown to visitors.
  • Privacy boundary (Nox): a user can ask Nox about their own record; others' personal info is gated.

Plan & limits

  • Account settings are available on all plans. No plan-specific limits here.

Technical implementation

  • Model: UserModel/home/bilal/Projects/knock-knock-app/backend/app/models/UserModel.js.
  • Routes: authRoutes.js (/auth/change-password, /auth/forget-password, /auth/reset-password/:token), userRoutes.js (/change-email, /user/otp-verification, PUT /user/:_id, DELETE /user/:_id/profile-image, PUT /user/online-status).
  • OAuth: GoogleController (POST /google/authenticate), AppleController (POST /apple/authenticate).
  • Frontend: frontend/src/views/settings/Account.vue.
  • See backend service.