Company
Date Published
Author
Richard Ma
Word count
2115
Language
English
Hacker News points
None

Summary

The U2F API is being deprecated and will no longer be supported by Google Chrome after February 2022, forcing developers to migrate their applications to WebAuthn for strong authentication. The migration involves two main parts: authenticating existing U2F devices with WebAuthn and registering new devices with WebAuthn. For authentication, the process involves generating a challenge and state, creating PublicKeyCredential data, verifying the device, and sending the result back to the server where it is used to authenticate users. For registration, the process involves generating a PublicKeyCredentialRpEntity and state, creating PublicKeyCredential data, registering the device, and extracting some data from the response to save the registered device data. The migration requires replacing U2F API calls with their WebAuthn equivalents in both the frontend and backend codebases.