Repository navigation
passkeys: register []any and map[string]any with encoding/gob - #263
Merged
Merged
Conversation
When a passkey user refreshes or registers their identity while holding an existing or expired TLSPROXYAUTH cookie, SetAuthTokenCookie sets the "th" claim to []any (unmarshaled from JSON as []interface{}). Persisting user.Claims via github.com/c2FmZQ/storage failed with 'gob: type not registered for interface: []interface {}'.
- Register []any and map[string]any in passkeys.init() so arbitrary JSON-unmarshaled JWT claims can be gob-encoded into the passkey store.
- Fix the redirectClaims["depth"] type assertion in HandleCallback from int to float64, strip "depth" before persisting user.Claims, and propagate depth explicitly in setAuthToken.
- Prefer the authenticated passkey's email query parameter over redirectClaims["email"] during RefreshID.
rthellend
force-pushed
the
fix-passkeys-gob
branch
from
November 4, 2026 19:00
6095fa3 to
91e80ca
Compare
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
When a passkey user refreshes or registers their identity while holding an existing or expired TLSPROXYAUTH cookie, SetAuthTokenCookie sets the "th" claim to []any (unmarshaled from JSON as []interface{}). Persisting user.Claims via github.com/c2FmZQ/storage failed with 'gob: type not registered for interface: []interface {}'.
Register []any and map[string]any in passkeys.init() so arbitrary JSON-unmarshaled JWT claims can be gob-encoded into the passkey store. Also fix the redirectClaims["depth"] type assertion in HandleCallback from int to float64.
Type of change
How is this change tested ?