Been writing a web app using swift/hummingbird. For fun, I want auth to be passkey-only. But, I’m running into a fairly basic issue:

How do I write a controller-level test to verify my #passkey implementation works?
I’m using https://github.com/hummingbird-project/hummingbird-examples/blob/main/webauthn/Sources/App/Controllers/WebAuthnController.swift as a reference implementation, but that particular example has no tests for passkey auth. I want to verify I’m doing the right things, and also have a harness for quickly getting auth for testing other auth-required pages.

#swiftlang #SwiftOnServer

hummingbird-examples/webauthn/Sources/App/Controllers/WebAuthnController.swift at main · hummingbird-project/hummingbird-examples

Examples demonstrating various aspects of the Hummingbird swift server framework - hummingbird-project/hummingbird-examples

GitHub
@younata Do want an integration test that tests the end-to-end flow?
@pixelscience that’s about what I have right now. It doesn’t make a real network request, but routing & middleware are all set up.
I am not interested in using something like a headless browser for a fully integrated test.