web-auth/webauthn-lib ? reverse-engineered prompt
Reverse engineered prompt
Build me a PHP library for WebAuthn and FIDO2 support so a website can let users register and sign in with security keys or passkeys.
I want it to handle the usual WebAuthn flow, creating registration challenges, verifying the response from the browser, then creating login challenges and checking the assertion back from the device. Please make it easy to install with Composer, keep the code clean and well organized, and include enough examples or tests so it’s clear how a developer would use it in a real app.
If you need to check the current WebAuthn docs or browser expectations, look them up online and follow the common behavior. Focus on a solid PHP library that supports compatible authenticators and devices, and make sure the public API feels simple for app developers to wire into registration and authentication screens.
Are you gonna build this?
make sure you review the code using coderabbit