Skip to content

Conversation

@arch1995
Copy link
Contributor

@arch1995 arch1995 commented Feb 11, 2026

Motivation and Context

Jira Link: https://consensyssoftware.atlassian.net/browse/W3APD-5323

Description

Issue

  • User was getting an invalid private key error as the key was not there in the session data.

Resolution

  • Key was not there because the user might be using a default verifier. This PR handles these errors gracefully.

Chore

  • Update the deps and code in react app sfa.

How has this been tested?

Devrels tested this.

Screenshots (if appropriate):

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

Medium Risk
Changes login flow behavior when useSFAKey is enabled by logging out and throwing a new/clearer sfaKeyNotFound error, and upgrades the demo app to @web3auth/modal plus React 19—both could affect connection/rehydration behavior and compatibility.

Overview
Improves error handling for SFA-key logins: when useSFAKey is enabled but the session lacks coreKitKey (e.g., default verifier), the auth connector now proactively logs out (if a session exists) and throws WalletLoginError.sfaKeyNotFound with a clearer message instead of failing later with an invalid key.

Updates the vite-react-app-sfa demo to use @web3auth/modal (instead of @web3auth/no-modal), switches the Google flow to connectTo(WALLET_CONNECTORS.AUTH, ...), adds a basic “Login with Web3Auth” button, and adjusts Web3Auth config (new clientId, sapphire_devnet, useSFAKey: true). Also bumps React/ReactDOM to 19.2.4 and enables window.global polyfill in index.html.

Written by Cursor Bugbot for commit 214436f. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Feb 11, 2026 10:32am

Request Review

@arch1995 arch1995 self-assigned this Feb 11, 2026
Copy link

@cursor cursor bot left a comment

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 2 potential issues.

@chaitanyapotti chaitanyapotti merged commit 786fced into v10 Feb 11, 2026
4 checks passed
@chaitanyapotti chaitanyapotti deleted the fix/use-sfa-key branch February 11, 2026 10:39
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