fix: webauthn session data cred params#2759
Open
lfleischmann wants to merge 2 commits into
Open
Conversation
Bumps [github.com/go-webauthn/webauthn](https://github.com/go-webauthn/webauthn) from 0.10.2 to 0.17.4. - [Release notes](https://github.com/go-webauthn/webauthn/releases) - [Changelog](https://github.com/go-webauthn/webauthn/blob/master/CHANGELOG.md) - [Commits](go-webauthn/webauthn@v0.10.2...v0.17.4) --- updated-dependencies: - dependency-name: github.com/go-webauthn/webauthn dependency-version: 0.17.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
go-webauthn v0.17.4 added a mandatory algorithm-match check in CreateCredential, driven by SessionData.CredParams. Hanko round-trips WebAuthn session data through its own DB model instead of holding the library struct in memory, and that mapping never carried CredParams, so every registration finish failed with "Credential public key algorithm not supported". Persist CredParams via a new json column and round-trip it through NewWebauthnSessionDataFrom/ToSessionData. Also removes the orphaned dto/intern/WebauthnSessionData.go duplicate mapping, left over from the pre-flowpilot webauthn handler removal, which had the same gap and zero remaining callers.
lfleischmann
marked this pull request as ready for review
July 20, 2026 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
An earlier go-webauthn version added a mandatory algorithm-match check in
CreateCredential, driven bySessionData.CredParams. Hanko round-trips WebAuthn session data through its own DB model instead of holding thelibrary struct in memory, and that mapping never carried
CredParams, so every registration finish failed with "Credential public key algorithm not supported". Without this fix, we keep staying behind library updates.Implementation
CredParamsvia a new json column and round-trip it throughNewWebauthnSessionDataFrom/ToSessionData.dto/intern/WebauthnSessionData.goduplicate mapping, left over from the webauthn handler removal, which had the same gap and zero remaining callers.Tests
Unit
Manual
With and without these changes: