A library that integrates webauthn4j in a
Play framework app,
providing the server-side registration and verification services of
the Web Authentication standard.
This library provides a PasskeyAuth class, which gives you:
- a verification action that can be composed with other action builders
- a controller that can be included in a Play routes file to perform standard passkey operations.
The library is storage-agnostic. You must decide how best to store passkey data in your infrastructure. Consequently, the integration depends on the implementation of some service traits.
Add to your build.sbt:
libraryDependencies += "com.gu" %% "play-passkey-auth" % "<version>"- Define a PasskeyUser instance for your user type.
- Implement a PasskeyRepository.
- Implement a PasskeyChallengeRepository.
- Implement a CreationDataExtractor.
- Implement an AuthenticationDataExtractor.
- Implement a PasskeyNameExtractor.
- Implement a UserExtractor.
- Pass these as arguments into a PasskeyAuth.
show actual Scala/Play code how to handle common failure cases how it fits into existing Play apps