Skip to content

fix: Parsing claims for new users.#28

Merged
hwalker56 merged 2 commits intomainfrom
fix/claims
Apr 8, 2026
Merged

fix: Parsing claims for new users.#28
hwalker56 merged 2 commits intomainfrom
fix/claims

Conversation

@noahpistilli
Copy link
Copy Markdown
Member

Upon checking the logs, /link/wii is returning HTTP 307, which points to claims failing to be parsed. This is most likely due to the PublicProfile field being a bool. New users have no custom claims, meaning JSON parser cannot find public_profile and does not default to a value, rather error. For other fields such as wiis which is a slice, it can be set to nil. The fix to this is to make PublicProfile a *bool, allowing JSON parser to set to nil if it cannot be found.

@noahpistilli noahpistilli requested a review from a team April 8, 2026 13:32
link.go Outdated
payload := map[string]any{
"attributes": map[string]any{
"public_profile": publicProfile,
"public_profile": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm mistaken, this would reset this property to false every time a user links another console.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, I reverted this change.

@hwalker56 hwalker56 merged commit a3edf86 into main Apr 8, 2026
2 checks passed
@hwalker56 hwalker56 deleted the fix/claims branch April 8, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants