Back to Playbook
Act 1: First Contact

4. Email Verification & Password Setup

Story

Sarah checks her inbox. An email from Zetta HRM arrives with the subject "You're invited to Zetta HRM". It contains a six-digit OTP and a link to the account verification page.

She clicks the link, enters the OTP, and is prompted to set a password. She chooses a strong password, confirms it, and is automatically logged in.

Happy Path

  1. 1User clicks the link in the email → the account verification page
  2. 2User enters the six-digit OTP → submits the verification form
  3. 3OTP is valid → session created, user proceeds to password setup
  4. 4User enters and confirms a strong password → submits the password setup form
  5. 5User is auto-logged in with HTTP-only cookie tokens (access + refresh)
  6. 6Redirect to company context or dashboard

Failure Modes

FailureWhat the user seesWhat happens next
Wrong OTP"Invalid OTP"User retries (limited attempts)
OTP expired"OTP expired"User requests a new one via resend
Max OTP retries exceededOTP invalidatedUser must request a fresh OTP
Email never arrives"Check your email" with resend buttonUser clicks resend, new OTP generated
Email sent to wrong addressUser cannot receive the OTPContact support to update email and resend
Weak passwordPassword strength requirements shownUser chooses a compliant password
Passwords do not match"Passwords don't match"User retypes both fields
Tampered link or token400 "Invalid or malformed token"User requests a fresh invite
Token already used (replay attack)Token consumed, cannot be reusedSecurity measure — one-time use only
Invitation link expired"Invitation expired"Admin must re-invite the user

Edge Cases

ScenarioBehaviorWhy
User already verifiedRedirected straight to dashboardNo need to repeat verification
User navigates to verify page without a pending OTPRedirected to signupNo pending invitation to verify
User clicks resend repeatedlyRate limited: 3 attempts per 15 minutesPrevents email spam
User closes browser after OTP but before setting passwordCan resume within the expiry windowOTP verification is stored, password step can continue

ZettaHRM

A modern HRM workspace for employee management, attendance tracking, leave approvals and structured day-to-day HR operations.

© 2026 Zettabyte Technology Inc.|All rights reserved.