fix: authorizeSession API fixes and example update#48
Merged
chaitanyapotti merged 1 commit intomasterfrom Mar 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
chaitanyapotti
approved these changes
Mar 23, 2026
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.

Motivation and Context
Jira Link:
Description
How has this been tested?
Screenshots (if appropriate):
Screen.Recording.2026-03-23.at.12.22.23.PM.mov
Types of changes
Checklist:
Note
Medium Risk
Touches session authorization, origin allow-listing, and decryption metadata parsing, so regressions could break login/session establishment across platforms. No new external dependencies, but error-handling behavior and sample credentials were changed.
Overview
Session authorization requests are corrected and hardened.
Web3AuthApi.authorizeSessionnow derives theoriginheader from the provided redirect URL (authority only) and simplifies JSON deserialization handling.Session creation now uses a specific allowed origin instead of a wildcard. Calls to
createSessioninWeb3Auth.cspass the current redirect URL rather than"*", tightening origin constraints.Store response parsing is made more robust.
Web3Auth.csaddsparseShareMetadataFromStoreMessageto handle both direct and wrapped ({ value: ... }) share-metadata formats, and adds stricter null/field validation with updated log messages in both authorize and timeout flows.Sample config is updated. The sample scene/script updates the embedded
clientIdvalue (and removes a BOM inWeb3AuthSample.cs).Written by Cursor Bugbot for commit 17c19f0. Configure here.