Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 9006216. Configure here.
| <Footer privacyPolicy={privacyPolicy} termsOfService={tncLink} /> | ||
| <Footer | ||
| privacyPolicy={!consentRequired && modalState.status !== MODAL_STATUS.CONSENT_REQUIRED ? privacyPolicy : undefined} | ||
| termsOfService={!consentRequired && modalState.status !== MODAL_STATUS.CONSENT_REQUIRED ? tncLink : undefined} |
There was a problem hiding this comment.
Footer links hidden on all screens when consent enabled
Medium Severity
When consentRequired is true, the !consentRequired condition is always false, causing privacyPolicy and tncLink to be undefined on every screen — including the initial login page, connecting screen, and success screen — not just the consent screen. The intent is to hide footer links only when the consent screen is active (where the links appear inline), but the condition short-circuits due to !consentRequired. The status check modalState.status !== MODAL_STATUS.CONSENT_REQUIRED alone would achieve the desired behavior.
Reviewed by Cursor Bugbot for commit 9006216. Configure here.
There was a problem hiding this comment.
This is intended. we only show privacy and terms links in the footer if consent required is false.


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
Medium Risk
Adds a new intermediate
CONSENT_REQUIREDstate/event to the core connection lifecycle and changes whenconnected/authorizedare emitted, which could affect integrators that rely on existing event ordering and status semantics.Overview
Adds an optional consent gate that pauses the login flow after connection and requires users to accept Terms/Privacy before completing. This introduces a new
CONSENT_REQUIREDconnector status plusCONSENT_REQUIRED/CONSENT_ACCEPTEDevents, and a newacceptConsent()API in@web3auth/no-modal(withlogout()now allowed from the consent state and connection events flagged viapendingUserConsent).Updates
@web3auth/modalto surface the consent UI:LoginModaltransitions to a newCONSENT_REQUIREDmodal status,Loaderrenders an accept/decline screen, andmodalManagerwires accept/decline callbacks (accept resumes viaacceptConsent(), decline logs out and closes the modal). React/Vue providers also listen forCONSENT_ACCEPTEDto update connection state.Bumps
@web3auth/authto11.6.0across the monorepo, demos, and lockfile.Reviewed by Cursor Bugbot for commit 9006216. Bugbot is set up for automated code reviews on this repo. Configure here.