Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tuna1207
previously approved these changes
Apr 17, 2026
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 fec94d2. Configure here.
lionellbriones
commented
Apr 17, 2026
| // authMode: "", | ||
| connectors: [], | ||
| initialAuthenticationMode: CONNECTOR_INITIAL_AUTHENTICATION_MODE.CONNECT_AND_SIGN, | ||
| consentConfigMode: "required", |
Contributor
Author
There was a problem hiding this comment.
i think consentConfigMode is set only on dashboard. not sure if we should include it on sdk config.
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
Introduces a consent gate that requires users to accept Terms and Conditions / Privacy Policy before completing the login flow. When
consentRequiredis enabled inuiConfig(along withtncLinkandprivacyPolicyURLs), the SDK pauses after wallet connection and prompts the user to accept or decline before proceeding.Jira Link:
https://consensyssoftware.atlassian.net/browse/EMBED-80
Description
New Connector Status:
CONSENT_REQUIREDCONSENT_REQUIREDtoCONNECTOR_STATUSandCONNECTOR_EVENTSconstants.CAN_LOGOUT_STATUSESto allow logout from the consent-required state.ConnectorEventsandWeb3AuthNoModalEventstypings with the new event.Core SDK (
no-modal)Web3AuthNoModal: AddedconsentRequiredflag,pendingConnectedData, andpendingAuthorizedDatafields to buffer connection/authorization data while awaiting user consent.connectToConnector: When consent is required, theconnectedevent handler now emitsCONSENT_REQUIREDinstead ofCONNECTED, and buffers theAUTHORIZEDevent data.acceptConsent(): New public method that resumes the login flow — transitions status fromCONSENT_REQUIREDtoCONNECTED/AUTHORIZED, connects plugins, and emits buffered events.logout(): Updated to allow logout fromCONSENT_REQUIREDstate, clearing any pending data.consentRequiredwhen restoring status fromidToken.Modal Manager (
modal)consentRequired,privacyPolicy, andtncLinkfromuiConfigin the constructor.onAcceptConsentandonDeclineConsentcallbacks toLoginModal.onAcceptConsentcallsacceptConsent();onDeclineConsentcallslogout()and closes the modal.UI Components (
modalUI layer)LoginModal: Listens for theCONSENT_REQUIREDconnector event and transitions modal to consent status. ExposesconsentRequiredflag. Forwards accept/decline handlers.WidgetContext: AddedhandleAcceptConsentandhandleDeclineConsentto the widget context.Root: Passes consent handlers and TnC/privacy links to theLoader. Hides footer links when consent screen is active.Loader: NewConsentRequiredStatussub-component renders the consent UI with accept/decline buttons, TnC link, and privacy policy link. Shown whenmodalStatus === CONSENT_REQUIRED.How has this been tested?
Screenshots (if appropriate):
Login flow
Screen.Recording.2026-04-13.at.5.17.32.PM.mov
Consent screen


Types of changes
Checklist:
Note
High Risk
High risk because it alters core connection/authorization state machines and event semantics (new
CONSENT_REQUIRING/CONSENT_ACCEPTEDflow) and changes when apps consider a session connected/authorized.Overview
Adds an optional consent gate to Web3Auth login: when
uiConfig.consentConfig.requiredis set, the SDK pauses after wallet connection and surfaces a terms/privacy acceptance step before completing the session.This introduces new connector status/events (
CONSENT_REQUIRING,CONSENT_ACCEPTED), anacceptConsent()/completeConsentAcceptance()path, and updates modal/no-modal + React/Vue context hooks to avoid marking users connected until consent is accepted; the modal UI adds a dedicated consent screen with accept/decline callbacks (decline logs out and closes the modal).Demo apps and packages bump
@web3auth/authto11.6.0and add UI toggles to enable/disable consent config in the Vue and Wagmi React demos; tests are extended to cover the new consent-driven connect resolution and hook behavior.Reviewed by Cursor Bugbot for commit 32c89fb. Bugbot is set up for automated code reviews on this repo. Configure here.