Habr•October 11, 2026•🇷🇺Translated from Russian

Passkeys in Production: How One Developer Replaced Passwords with Face ID in Three Days Using FastAPI and Next.js

Passkeys are no longer future technology. They already power authentication in major banking apps on phones, including Alpha-Bank, Tinkoff, and Sber. GitHub, Apple, and Google have also adopted them. Yet many web services still require users to create passwords with uppercase letters, numbers, and special characters, followed by monthly reset prompts.

Yaroslav Morozov, who builds Continental IT consulting and an internal product, decided to skip password friction when implementing authorization. The team chose Passkeys and completed the rollout in three days. This article delivers complete production code from database migration to the Face ID login button, using FastAPI on the backend and Next.js on the frontend.

Why Passkeys Matter

Passkeys offer superior security and convenience. Passwords can be phished on fake sites, while Passkeys bind cryptographic keys to the correct domain. Database leaks expose bcrypt hashes that attackers can crack, but private keys never leave the device. Users no longer need to invent, remember, or reset passwords; a fingerprint or facial scan suffices. Unlike reused passwords across sites, each Passkey pair is unique per domain.

According to the FIDO Alliance, more than 15 billion accounts already support Passkeys. Google, Apple, and Microsoft have integrated support at the operating system level. Technically, Passkeys implement the WebAuthn standard from the FIDO2 family.

How Passkeys Work

A Passkey consists of an asymmetric key pair. The private key resides in the device Secure Enclave and never leaves it. The public key is sent to the server during registration. During authentication the server issues a random 32-byte challenge. The device signs it after biometric confirmation, and the server verifies the signature with the stored public key. No password travels over the network.

Discoverable credentials enable automatic synchronization across devices via iCloud Keychain on Apple platforms or Google Password Manager on Android. Passkeys replace only the login-password step; after successful verification the backend still issues standard JWT access and refresh tokens.

Database Schema and Models

Two PostgreSQL tables store everything. The webauthn_credentials table holds credential_id, public_key, sign_count, transports, and device_name. The webauthn_challenges table manages one-time challenges with a five-minute TTL. SQLAlchemy models map these tables with proper relationships and cascade deletes.

Backend Service with py-webauthn

The service uses only three environment variables for RP ID, RP name, and origin. Custom exceptions handle verification failures, missing credentials, and deactivated accounts. Methods generate registration and authentication options, verify responses, save and pop challenges, and manage user credentials. All cryptographic operations rely on the mature py-webauthn library.

Related articles

AntiMalware•Other

Former Smolensk Digital Development Minister Andrey Rudometkin Charged with Large-Scale Fraud and Abuse of Office

Andrey Rudometkin, who served as head of the Ministry of Digital Development of Smolensk Oblast from 2023 until his dismissal in October 2025, now faces criminal charges including fraud on an especially large scale and multiple counts of exceeding official authority. The regional Ministry of Digital Development is listed as the injured party in the case. Prosecutors allege two episodes of power abuse, one committed as part of a group and motivated by personal gain, along with fraud under Part 4 of Article 159 of the Russian Criminal Code. Four individuals are named in the proceedings, including former information security department head Artem Kalugin, who is accused of abuse of office, and two additional defendants charged with large-scale fraud. Rudometkin has remained in custody since late 2025 despite repeated defense requests for release citing his three minor children and difficult family finances. The Smolensk court is scheduled to begin hearings on the case in the near future.

AntiMalware•Other

Minpromtorg Demands 138.97 Million Rubles in Penalties from ZNTC for Delays in 130 nm Russian Lithograph Project

The Russian Ministry of Industry and Trade has issued a claim against the Zelenograd Nanotechnology Center for 138.97 million rubles in penalties over missed deadlines in the development of a domestic 130 nm lithography system. The 5.55 billion ruble state contract was signed in December 2021 and requires completion by the end of 2026. The third stage, originally due on 31 March 2024, was only submitted in July, with acceptance signed in August. Company head Anatoly Kovalev attributed the delay to sanctions that complicated cooperation with foreign suppliers. Despite the penalty claim, the project is still expected to finish on schedule, with serial equipment deliveries planned for 2027. The stage included production of two 193 nm excimer laser prototypes, photomasks, test structures, and an objective measurement stand.

Habr•Other

Cloud4U Webinar Details Migration to On-Premises Microsoft Exchange Server Including Email, Calendars and Infrastructure Setup

Cloud4U is hosting a webinar on November 20 at 12:00 MSK focused on migrating corporate email systems to a self-hosted Microsoft Exchange server. The session covers end-to-end planning from initial preparation and pilot testing through full data transfer and final cutover. Participants will learn practical methods for moving messages and calendars while maintaining delivery reliability and avoiding spam folder placement. Specific tools such as imapsync and PST files are examined along with strategies for handling duplicate messages during repeated sync passes. The webinar also addresses why simply updating MX records is insufficient and explains the correct configuration of SPF, DKIM and DMARC records. Additional topics include calendar migration via ICS files, limitations with active meetings, and post-migration verification steps before decommissioning the legacy system.

AntiMalware•Other

MTS Expands Global Access Service to Most Tariffs for ChatGPT, Netflix and Other Foreign Platforms

MTS has broadened availability of its Global Access service, which enables subscribers to reach ChatGPT, Claude, Netflix, Spotify and similar overseas platforms without using a VPN. The option is now offered on the majority of current and archived tariff plans, with the exception of Membrana, MTS Junior and MTS Junior+. It remains incompatible with Membrana, Safe Childhood and Safe Internet add-ons. Global Access functions exclusively over the MTS mobile network and requires no additional applications. Supported platforms also include Strava and Ticketmaster. The service is positioned for resources unavailable in Russia but not blocked by Roskomnadzor. New users receive seven free days, after which the monthly fee is 249 rubles, while TOP and TOP+ tariffs include it at no extra cost.