Skip to content

auth-service v10 and wallet-service changes. - #44

Open
grvgoel81 wants to merge 23 commits into
masterfrom
feat/auth_service_v10_change_plus_input_changes
Open

auth-service v10 and wallet-service changes.#44
grvgoel81 wants to merge 23 commits into
masterfrom
feat/auth_service_v10_change_plus_input_changes

Conversation

@grvgoel81

@grvgoel81 grvgoel81 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Motivation and Context

  • Auth-service v10 changes
  • Wallet-service changes
  • ProjectConfig Update
  • Example updates

Jira Link: https://toruslabs.atlassian.net/browse/PD-4518, https://toruslabs.atlassian.net/browse/PD-4552

Description

  • Auth-service v10 changes
  • Wallet-service changes
  • ProjectConfig Update
  • Example updates

How has this been tested?

  • On Unity Editor

Screenshots (if appropriate):

Screen.Recording.2025-04-17.at.1.52.27.PM.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

High Risk
Large breaking API and auth/wallet integration changes affect login, session restore, dapp-share keys, and chain selection for all integrators; misconfiguration could break production apps until migrated.

Overview
Updates the Unity Web3Auth SDK for auth-service v10 and wallet-service v5, with a broad breaking rename from verifier/provider login to auth connections.

Configuration & API: Project config is fetched from /api/v2/configuration with build_env; the response model adds chains, smart accounts, wallet UI, and embedded-wallet auth. Init options use authConnectionConfig (replacing loginConfig), authBuildEnv, web3AuthNetwork, defaultChainId, and useSFAKey (replacing useCoreKitKey). Provider / TypeOfLogin are removed in favor of AuthConnection; LoginConfigItem becomes AuthConnectionConfig with authConnectionId.

Wallet & signing: launchWalletServices(ChainConfig) is replaced by showWalletUI, and request no longer takes per-call chain config—chains, embeddedWalletAuth, and smartAccounts are injected from cached project config. Auth/wallet base URLs point at v10 / v5.

Public surface: LoginParams uses authConnection (not loginProvider); UserInfo uses authConnectionId / userId; keys are exposed via getPrivateKey / getEd25519PrivateKey with JSON-mapped privateKey on the response. The sample app is updated to match.

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

grvgoel81 and others added 20 commits April 17, 2025 08:47
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
…other input params

Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
Signed-off-by: Gaurav Goel <gaurav@tor.us>
grvgoel81 and others added 3 commits July 30, 2025 11:06
Signed-off-by: Gaurav Goel <gaurav@tor.us>
…s_input_changes' into feat/auth_service_v10_change_plus_input_changes
…anges

Resolve conflicts by keeping auth-service v10 API changes while
preserving master bug fixes for clientId resolution and session parsing.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 6 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

{
Debug.Log($"Chain ID: {config.chainId}, RPC Target: {config.rpcTarget}, Ticker: {config.ticker}, Namespace: {config.chainNamespace}");
}
web3Auth.showWalletUI("0x1");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong wallet UI path argument

High Severity

showWalletUI is called with "0x1", but that parameter is the wallet URL path (default "wallet"), not a chain ID. This opens /0x1 instead of the wallet UI, so Launch Wallet Services fails in the sample.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

set { }
}

public List<AuthConnectionConfig>? authConnectionConfig { get; set; } = new List<AuthConnectionConfig>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Empty auth config always sent

High Severity

authConnectionConfig defaults to an empty list, so the null check in setOptions always passes and serializes [] into login options. Apps that rely on dashboard connections without a local config can send an empty override.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

{
this.web3AuthOptions.walletServicesConfig.whiteLabel =
this.web3AuthOptions.walletServicesConfig.whiteLabel?.merge(whitelabel) ?? whitelabel;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wallet services config unused

High Severity

walletServicesConfig is merged with project whitelabel but never copied into initParams for showWalletUI or request. confirmationStrategy and wallet-specific whiteLabel therefore never reach the wallet SDK.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

public string ui_locales { get; set; }
public string id_token { get; set; }
public string access_token { get; set; }
private EmailFlowType flow_type { get; set; } = EmailFlowType.link;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Private email flow type

Medium Severity

flow_type is declared private, so callers cannot set it and Newtonsoft will not serialize it. Email passwordless link/code selection is effectively unavailable despite the new EmailFlowType API.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.


[JsonProperty("default")]
DEFAULT
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Broken wallet enum serialization

Medium Severity

ConfirmationStrategy and ButtonPositionType use JsonProperty on enum members without StringEnumConverter or EnumMember. Newtonsoft will emit integers or C# names instead of values like popup and bottom-left.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

{
public class SmartAccountsConfig
{
public SmartAccountType SmartAccountType { get; set; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Smart account type key casing

Medium Severity

The property is named SmartAccountType while sibling fields use camelCase and the API expects smartAccountType. Outbound serialization of smartAccounts in wallet/request sessions emits the wrong JSON key.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b08607a. Configure here.

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.

1 participant