DocHub
10-minute password skip mechanism for edit and delete actions

Password Bypass Feature

Editing or deleting packages in MaxTracks Web requires a password prompt. The “Do not ask for a password for the next 10 minutes” feature allows users to bypass repeated password prompts after one successful authentication.

How It Works

  1. User triggers an edit or delete action on a package
  2. App checks Firestore document Temp/timer for isPasswordExpired flag
  3. If expired (or missing): show password modal with bypass checkbox
  4. If not expired (within 10-min window): skip modal, proceed with action
  5. On correct password + checkbox checked: call startNoPasswordPeriod cloud function
  6. Cloud function sets isPasswordExpired=false and expiresAt=now+10min
  7. Scheduled function resetPasswordExpiry (runs every 1 minute) resets when time expires

Firestore Document

Collection: Temp
Document: timer

Field Type Description
isPasswordExpired boolean true = password required, false = bypass active
expiresAt Timestamp When the bypass period expires

Cloud Functions

startNoPasswordPeriod (HTTP Callable)

Sets the 10-minute bypass window. Called from the frontend when user checks the bypass checkbox and enters correct password.

resetPasswordExpiry (Scheduled — every 1 minute)

Monitors Temp/timer and resets isPasswordExpired to true when current time exceeds expiresAt.

Pages Implementing This Feature

Page File Actions Covered
Receiving lib/features/receiving/pages/Receiving.dart Edit, Delete
Check In lib/CheckIn.dart Edit, Delete
Container Unloading lib/ContainerUnloading.dart Edit (showEditForm), Delete (deleteOrMarkMissingPackage)
Client Pickup lib/ClientPickUp.dart Edit (showEditForm), Delete (deletePackage)
Unloaded Not Checked In lib/UnloadedNotCheckedIn.dart Edit (showEditForm), Process (markPackageAsProcessed)
Unprocessed lib/Unprocessed.dart Delete (deletePackage)

UI Implementation

The password modal includes:

  • Password text field with visibility toggle
  • Checkbox: “Do not ask for a password for the next 10 minutes for this action.”
  • Loading spinner while verifying
  • Cancel and Submit buttons

The checkbox styling uses default Material Checkbox with 12.0 font size for the label text.