Feat: sdk v11 hooks#139
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.
Reviewed by Cursor Bugbot for commit 21f83dd. Configure here.
| private enableAnalyticsInDev: boolean = false; | ||
|
|
||
| constructor(options: AnalyticsOptions = {}) { | ||
| this.enableAnalyticsInDev = Boolean(options.enableAnalyticsInDev); |
There was a problem hiding this comment.
rename this pls. choose based on buildEnv
|
|
||
| // Minimal MessageEvent polyfill for @web3auth/auth postMessageStream, which reads | ||
| // MessageEvent.prototype at module-load time (Hermes has no browser MessageEvent global). | ||
| if (typeof global.MessageEvent === "undefined") { |
There was a problem hiding this comment.
this won't load right..
can we patch web3auth/auth to not load at build time?
There was a problem hiding this comment.
I tested, this works, or by load do you mean the package @web3auth/auth doesn't load ?
There was a problem hiding this comment.
we can fix upstream @web3auth/auth
There was a problem hiding this comment.
here is the patch PR for @web3auth/auth
Web3Auth/Auth#402

Motivation and Context
This PR brings the React Hooks integration in line with Web3Auth SDK v11 session/auth APIs and dashboard-driven project configuration. Hooks consumers need clearer separation between connected (wallet/session keys) and authorized (citadel access token), plus hooks for token info and session refresh. It also aligns analytics, account abstraction (including EIP-7702), and setup docs with the rest of the v11 SDK surface.
Jira Link: https://consensyssoftware.atlassian.net/browse/EMBED-399
Description
React Hooks
Core SDK
Metro & docs
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Note
Low Risk
Changes are documentation and sample-app only; no production SDK logic in this diff.
Overview
Documentation is expanded for v11 onboarding: Node/npm requirements, bare vs Expo dependency installs, Metro
withWeb3Authwrapping, mandatory@web3auth/react-native-sdk/setupas the first import, redirect URL / whitelist guidance (including Expo Go vs standalone), and a new analytics section (disableAnalytics,buildEnv, tracked events).Integration examples move from
login/OPENLOGIN_NETWORKtoinit()+connectTo()withWEB3AUTH_NETWORK,EncryptedStorage/SecureStore, and updated redirect schemes. The bare hooks demo adds the setup import and exercises v11 session APIs:isAuthorized/accessTokenfromuseWeb3Auth(),useAccessToken,useAuthTokenInfo, anduseRefreshSession(replacinguseIdentityTokenin that sample). Sample app links now point at thedemofolder.iOS lockfile for the bare hooks example picks up
RNCAsyncStorageand refreshed pod checksums (CocoaPods 1.16.2).Reviewed by Cursor Bugbot for commit b53ebb8. Bugbot is set up for automated code reviews on this repo. Configure here.