Skip to content

[FE-03] Biometric check-in: frontend UI using WebAuthn API #1158

Description

@yusuftomilola

Overview

The check-in page at frontend/app/check-in/page.tsx is manual-form-based only. Biometric clock-in/out is a prominently advertised feature of ManageHub. The frontend must prompt for fingerprint or face ID using the browser's Web Authentication API (WebAuthn).

Context

  • Current check-in page: frontend/app/check-in/page.tsx
  • useCheckIn hook: frontend/lib/react-query/hooks/workspace-tracking/useCheckIn.ts
  • Browser WebAuthn API: navigator.credentials.get({ publicKey: ... })
  • Depends on BE-05 (biometric backend endpoint) being implemented first

Tasks

  • Add a Use Biometric Check-In button to the check-in page
  • On click, call navigator.credentials.get({ publicKey: challengeFromServer }) to trigger the device biometric prompt (fingerprint / Face ID)
  • Send the WebAuthn assertion response to POST /workspace-tracking/biometric/check-in
  • Show a success confirmation with the check-in timestamp on completion
  • If WebAuthn is not available on the device (!window.PublicKeyCredential), hide the biometric button and show a message explaining biometric is not supported on this device
  • If the user has not yet enrolled a biometric credential, show an Enroll Biometric prompt that calls the registration endpoint

Files to Modify / Create

  • frontend/app/check-in/page.tsx
  • frontend/lib/react-query/hooks/workspace-tracking/useCheckIn.ts

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions