Representative authentication workflow

Passkey & TOTP Account Security

A security-focused account upgrade combining passkey registration and sign-in with authenticator-app TOTP, recovery boundaries, and existing PHP session rules.

PHP MySQL JavaScript WebAuthn Passkeys TOTP Sessions
Abstract interface preview for Passkey & TOTP Account Security
RoleAuthentication and account-security developer
Product typeRepresentative authentication workflow
FocusPHP · Authentication · Security

01 · The problem

Business and technical context

An established PHP account system needed stronger sign-in options without breaking current sessions, password access, user recovery, or the permission rules already attached to each account.

02 · The solution

Implementation approach

I mapped the existing login and session lifecycle, added server-verified WebAuthn registration and authentication ceremonies, introduced time-based one-time-password enrollment with QR setup, and defined recovery and step-up behavior around the product’s current account model.

03 · Key functionality

What I delivered

01

Origin- and relying-party-aware WebAuthn registration flow.

02

Passkey authentication connected to existing PHP accounts and sessions.

03

Authenticator-app QR enrollment with server-side TOTP verification.

04

Replay, expiry, session-regeneration, and account-state checks.

05

Recovery and fallback boundaries documented for product review.

04 · Constraints

Important challenges

Adding stronger authentication without creating a second account identity model.

Keeping browser ceremonies, server challenges, and session state synchronized.

Designing recovery behavior that does not undermine the new factors.

05 · System view

High-level architecture

1 Browser WebAuthn or authenticator app
2 PHP challenge and factor verification
3 MySQL credential state
4 Existing account session and permissions

06 · Interactive system motion

Explore how the layers influence one another.

This abstract simulation turns the architecture above into a small spring-and-collision system. Move or press inside the canvas to disturb it. It is a systems visualization, not customer footage or a product screenshot.

Delivery in motionLocal, lightweight abstract video—not client footage.
Abstract loop showing requests moving through application layers
Request-to-release loopProcedural visual explaining flow rather than implying a real interface.

07 · Result

Operational improvement

Accounts could use the agreed passkey and TOTP paths within the existing login system.
Server-side challenge, factor, and session checks remained authoritative.
Fallback and recovery decisions were made explicit for maintainers and support staff.

Next case study

Explore more production-focused work.

Browse projects across marketplace systems, secure storage, SaaS payments, mobile backends, and external APIs.

All projects
Discuss a project