Time-based OTP in offline Mobile App

šŸŽÆ Purpose

Provides offline authentication capability through Time-based One-Time Passwords (TOTP) generated by the REL-ID mobile application, following the OATH TOTP standard. This factor works without internet connectivity.


šŸ”§ Technical Implementation

StandardSpecificationDetails
OATH TOTPRFC 6238 compliantIndustry standard time-based algorithm
Time Window30-second intervalsNew code generated every 30 seconds
Code Length6 digitsNumeric code for easy entry
AlgorithmSHA-1 basedStandard cryptographic hash function
SynchronizationTime-basedRelies on accurate device clock

šŸ“‹ Prerequisites and Requirements

RequirementStatusDescription
REL-ID Mobile Appāœ… RequiredApp must be installed and properly activated
Device Clockāš ļø CriticalAccurate time synchronization essential
TOTP Seedāœ… RequiredSecret key established during REL-ID enrollment
App Accessāœ… RequiredUser must be able to open and use mobile app

šŸ”„ Authentication Process

  1. Code Generation: Mobile app automatically generates current 6-digit TOTP code
  2. Code Display: Current code shown prominently in mobile app interface
  3. Code Entry: User manually enters 6-digit code on web authentication portal
  4. Server Validation: Web portal validates code against expected value for current time window
  5. Time Window Check: Code must be used within current 30-second window
  6. Single Use Validation: Each code can only be used once successfully
  7. Authentication Result: Valid code allows authentication to proceed

šŸ“Š Offline Capabilities

FeatureSupport LevelDescription
No Internet Requiredāœ… Full SupportWorks completely offline on mobile device
Battery Independentāœ… Full SupportFunctions with minimal device power
Network Independentāœ… Full SupportNo cellular or WiFi connection needed
Time Dependencyāš ļø Critical RequirementRequires accurate device clock synchronization

šŸŽÆ Success and Failure Scenarios

āœ… Success Scenarios

  • Valid Code: User enters correct 6-digit code within time window
  • Proper Timing: Code used within current 30-second interval
  • First Use: Code hasn't been previously used for authentication
  • Clock Synchronized: Device time matches server time within acceptable range

āŒ Failure Scenarios

Error TypeCauseUser ExperienceResolution
Invalid CodeWrong digits entered"Invalid code" error messageUser can retry with same or new code
Expired CodeCode from previous time window"Code expired" errorUser must wait for new code generation
Already UsedCode previously used successfully"Code already used" errorUser must wait for next code
Clock DriftDevice time out of syncPersistent validation failuresDevice time synchronization needed
Rate LimitingToo many failed attemptsTemporary account lockoutWait for cooling period to end

Troubleshooting Guidance

  • Code Not Working: Wait for next 30-second interval and try new code
  • Persistent Failures: Check device date/time settings and sync with network
  • Clock Issues: Enable automatic time synchronization on mobile device
  • App Problems: Restart mobile app or check for app updates
  • Backup Option: Use REL-IDverify Push Notification if data connection available