Skip to main content

WF-117: Account Recovery

Workflow ID: WF-117 Category: Security Priority: P2 Last Updated: January 11, 2026


Overview

This workflow handles account recovery for users who are locked out, including identity verification, password reset, MFA reset, and support escalation procedures.


Trigger Events

  • User clicks "Forgot Password"
  • User cannot complete 2FA
  • User reports lost device
  • Account locked due to failed attempts
  • Support ticket for access recovery

Sequence Diagram


Process Steps

1. Self-Service Password Reset

Standard Flow:

  1. User clicks "Forgot Password" on login page
  2. Enter registered email address
  3. Receive email with reset link (valid 1 hour)
  4. Click link, enter new password
  5. Login with new password

Password Requirements:

RequirementRule
LengthMinimum 12 characters
ComplexityUpper, lower, number, symbol
HistoryCannot reuse last 5 passwords
ExpiryLink expires in 1 hour

2. MFA Recovery Options

Option A: Backup Codes

If user has backup codes:

  1. Select "Use backup code" on 2FA screen
  2. Enter one of 10 pre-generated codes
  3. Login successful
  4. Warned to regenerate codes

Option B: Recovery Email

If backup email H.P.009-CONFIGured:

  1. Request recovery to backup email
  2. Verify via backup email link
  3. Temporarily disable 2FA (30 minutes)
  4. Login and reH.P.009-CONFIGure 2FA

Option C: Support Ticket

If no backup methods available:

  1. Submit support ticket
  2. Identity verification required
  3. Admin approval needed
  4. Manual MFA reset

3. Identity Verification

Required Documents (Any 2):

Document TypeExamples
Government IDPassport, Driver's License
Address ProofUtility bill, Bank statement
EmploymentCompany email verification
PaymentCredit card last 4 digits on file

Verification Process:

Day 1: User submits ticket + documents
Day 1-2: Support reviews documents
Day 2-3: Admin approval/denial
Day 3: MFA reset executed (if approved)

4. Account Unlock

Lockout Triggers:

TriggerLock DurationUnlock Method
5 failed passwords15 minutesWait or reset
10 failed passwords1 hourReset only
3 failed 2FA30 minutesWait or backup
Security flagIndefiniteSupport ticket

Automatic Unlock:

  • Wait for lockout duration
  • Use password reset flow

Manual Unlock:

  • Admin unlocks via dashboard
  • Requires audit trail entry

5. Support Escalation

Escalation Path:

Level 1: Automated recovery
↓ (Failed)
Level 2: Support ticket + ID verification
↓ (Failed or flagged)
Level 3: Admin review + manual verification
↓ (Failed or suspicious)
Level 4: Security team investigation

API Endpoints

EndpointMethodPurpose
/api/v1/auth/recovery/initiatePOSTStart recovery flow
/api/v1/auth/recovery/verifyPOSTVerify recovery token
/api/v1/auth/recovery/passwordPOSTSet new password
/api/v1/auth/recovery/mfaPOSTRequest MFA reset
/api/v1/auth/recovery/backup-codePOSTUse backup code

Request: Initiate Recovery

POST /api/v1/auth/recovery/initiate
{
"email": "user@example.com",
"recovery_type": "password"
}

Response

{
"status": "email_sent",
"recovery_id": "rec_123",
"expires_at": "2026-01-11T13:00:00Z",
"masked_email": "u***@example.com"
}

Email Templates

Password Reset Email

Subject: Reset your CODITECT password

Hi [Name],

We received a request to reset your password.

Reset your password: [RESET_URL]

This link expires in 1 hour.

If you didn't request this, ignore this email.
Your password will not change.

- CODITECT Security Team

MFA Reset Notification

Subject: Two-factor authentication has been reset

Hi [Name],

Your two-factor authentication has been reset.

Action required: Log in and set up 2FA again.

If you didn't request this, contact support immediately.

- CODITECT Security Team

Security Measures

MeasureImplementation
Rate limiting3 recovery requests per hour
Token expiry1 hour for password, 24h for MFA ticket
NotificationEmail on all recovery actions
Audit loggingAll attempts logged
IP trackingRecovery attempts from unusual IPs flagged

Audit Events

EventLogged
recovery.initiatedEmail, Type, IP
recovery.token.validatedToken ID, Result
recovery.password.changedUser ID, IP
recovery.mfa.requestedUser ID, Reason
recovery.mfa.approvedAdmin ID, User ID
recovery.mfa.deniedAdmin ID, User ID, Reason
account.unlockedAdmin/Auto, User ID

Error Messages

ErrorUser MessageSupport Action
EMAIL_NOT_FOUND"Check your email" (same msg)Verify email
TOKEN_EXPIRED"Link expired, request new one"Resend
RATE_LIMITED"Too many attempts, wait 1 hour"Wait or escalate
VERIFICATION_FAILED"Verification failed"Manual review


Last Updated: January 11, 2026