Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
5fd5ed8
add consent tnc flow
lionellbriones Mar 25, 2026
bf7567a
get consent required from uiConfig
lionellbriones Mar 26, 2026
1f92a53
get tnc links from root
lionellbriones Mar 26, 2026
8ec3811
hide tnc text if consent required is enabled
lionellbriones Mar 27, 2026
375ebf5
adjust size of the modal for consent screen
lionellbriones Mar 27, 2026
7403d93
update consent screen
lionellbriones Mar 31, 2026
8e6e769
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 2, 2026
95d0da7
update accept consent
lionellbriones Apr 2, 2026
92a1630
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 6, 2026
8c25b8d
fix merge issue
lionellbriones Apr 6, 2026
7a4cf10
update consent ui
lionellbriones Apr 6, 2026
9108c09
remove default true value for consentRequired
lionellbriones Apr 6, 2026
3ab20b1
smaller font for terms and privacy link
lionellbriones Apr 13, 2026
5c3bde5
Merge branch 'master' into feat/add-consent-screen
chaitanyapotti Apr 13, 2026
35f0cd9
use updated whitelabel type
lionellbriones Apr 13, 2026
4775a09
fix missing access and refresh token
lionellbriones Apr 14, 2026
0dbdd78
use event emitter to wait for consent
lionellbriones Apr 14, 2026
9006216
show loaders for connect and authorization before consent
lionellbriones Apr 14, 2026
4b17090
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 16, 2026
17874e1
consent response save to storage
lionellbriones Apr 16, 2026
3223dd8
remove setting default value for tnc links
lionellbriones Apr 16, 2026
01c18d5
update web3auth
lionellbriones Apr 16, 2026
1dac801
consentAcceptedListener update
lionellbriones Apr 16, 2026
068c375
add try catch for accept consent
lionellbriones Apr 16, 2026
0ea4a86
remove checks for accept declide consent as these are required props
lionellbriones Apr 16, 2026
5ace034
removed _consentRequired
lionellbriones Apr 16, 2026
50fea9e
rename consent userId to userAddress
lionellbriones Apr 16, 2026
6dd15cd
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 16, 2026
f732d2e
- fix authorization page not showing on consent required
lionellbriones Apr 17, 2026
6794db5
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 17, 2026
696e3a9
fix issue
lionellbriones Apr 17, 2026
b50458d
fix unconditionally showing connected state
lionellbriones Apr 17, 2026
f4c421e
check if there is pendingUser consent before connectedd
lionellbriones Apr 17, 2026
4cd9b62
fixed chainId and chainnamespace not being updated on accept consent
lionellbriones Apr 17, 2026
675e7dd
loading and rehydrate fix
lionellbriones Apr 17, 2026
6a71868
keep currentConnectionReconnected
lionellbriones Apr 17, 2026
72b82a3
Merge branch 'master' into feat/add-consent-screen
lionellbriones Apr 17, 2026
c853fff
fixed merged issues
lionellbriones Apr 17, 2026
e50352a
fix: fixed consent requiring check
lwin-kyaw Apr 17, 2026
05e82e4
fix: fixed rehydration
lwin-kyaw Apr 17, 2026
f1ab9a8
feat: restructure consent state
lwin-kyaw Apr 17, 2026
7245ecd
feat: handle CONSCENT_ACCEPTED in modalManager
lwin-kyaw Apr 17, 2026
7f9b0a0
feat: update modal ui config
lwin-kyaw Apr 17, 2026
e18a2a9
feat: update vue-app-new demo
lwin-kyaw Apr 17, 2026
c708502
feat: update react context hook
lwin-kyaw Apr 17, 2026
70de95c
feat: updated wagmi-react-app demo
lwin-kyaw Apr 17, 2026
fec94d2
fix: fixed build
lwin-kyaw Apr 17, 2026
32c89fb
fix: added missing await on setState
lwin-kyaw Apr 20, 2026
c32ec3d
Merge branch 'master' into feat/add-consent-screen
chaitanyapotti Apr 27, 2026
3b1084b
rename variables
chaitanyapotti Apr 27, 2026
2373cad
cleanup unused state
chaitanyapotti Apr 27, 2026
b69a9f6
fix: fixed lock
lwin-kyaw Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/vite-react-app-sfa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@react-oauth/google": "^0.12.1",
"@tanstack/react-query": "^5.74.11",
"@web3auth/auth": "^11.4.2",
"@web3auth/auth": "^11.6.0",
"@web3auth/modal": "file:../../packages/modal",
"@web3auth/sign-in-with-web3": "^6.1.0",
"ethers": "^6.13.4",
Expand Down
135 changes: 125 additions & 10 deletions demo/vue-app-new/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/vue-app-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@toruslabs/vue-components": "^8.1.2",
"@toruslabs/vue-icons": "^9.0.0",
"@wagmi/vue": "^0.5.1",
"@web3auth/auth": "^11.5.0",
"@web3auth/auth": "^11.6.0",
"@web3auth/modal": "file:../../packages/modal",
"@web3auth/no-modal": "file:../../packages/no-modal",
"@web3auth/sign-in-with-web3": "^6.1.0",
Expand Down
19 changes: 10 additions & 9 deletions demo/vue-app-new/src/MainView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ import { WagmiProvider } from "@web3auth/modal/vue/wagmi";
import { coinbaseConnector } from "@web3auth/no-modal/connectors/coinbase-connector";
import { computed, onBeforeMount, ref, watch } from "vue";

import {
CookieStorage,
LocalStorageAdapter,
MemoryStorage,
SessionStorageAdapter,
WEB3AUTH_NETWORK,
type StorageConfig,
} from "@web3auth/auth";
import { CookieStorage, LocalStorageAdapter, MemoryStorage, SessionStorageAdapter, WEB3AUTH_NETWORK, type StorageConfig } from "@web3auth/auth";
import AppDashboard from "./components/AppDashboard.vue";
import AppHeader from "./components/AppHeader.vue";
import AppSettings from "./components/AppSettings.vue";
Expand Down Expand Up @@ -132,11 +125,18 @@ const options = computed((): Web3AuthOptions => {
}
}

const { widget, targetId, externalWalletOnly } = formData;
const { widget, targetId, externalWalletOnly, consentConfigMode } = formData;
const { hideSuccessScreen } = formData.whiteLabel;
const uiConfig: Web3AuthOptions["uiConfig"] = enabledWhiteLabel
? { ...whiteLabel, widgetType: widget, targetId, hideSuccessScreen, ...(externalWalletOnly && { primaryButton: "externalLogin" }) }
: { widgetType: widget, targetId, hideSuccessScreen, ...(externalWalletOnly && { primaryButton: "externalLogin" }) };
if (consentConfigMode === "required") {
uiConfig.consentConfig = {
required: true,
privacyPolicy: "https://example.com/privacy",
tncLink: "https://example.com/terms",
};
}
const authConnectorInstance = authConnector({ connectorSettings: {} });

return {
Expand Down Expand Up @@ -254,6 +254,7 @@ onBeforeMount(() => {
formData.smartAccountChainsConfig = json.smartAccountChainsConfig || {};
formData.defaultChainId = json.defaultChainId;
formData.initialAuthenticationMode = json.initialAuthenticationMode;
formData.consentConfigMode = json.consentConfigMode || "required";
formData.externalWalletOnly = json.externalWalletOnly || false;
formData.tokenStorage = json.tokenStorage || "default";
}
Expand Down
10 changes: 10 additions & 0 deletions demo/vue-app-new/src/components/AppSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
chainNamespaceOptions,
clientIds,
confirmationStrategyOptions,
consentConfigOptions,
getDefaultBundlerUrl,
languageOptions,
loginProviderOptions,
Expand Down Expand Up @@ -245,6 +246,15 @@ const onSmartAccountChainChange = (chainIds: string[]) => {
]"
matchParentsWidth
/>
<Select
v-model="formData.consentConfigMode"
data-testid="selectConsentConfig"
:label="$t('app.consentConfig')"
:aria-label="$t('app.consentConfig')"
:placeholder="$t('app.consentConfig')"
:options="consentConfigOptions"
matchParentsWidth
/>
<Toggle
v-model="formData.showWalletDiscovery"
data-testid="showWalletDiscovery"
Expand Down
8 changes: 8 additions & 0 deletions demo/vue-app-new/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ export const languageOptions: { name: string; value: LANGUAGE_TYPE }[] = [
{ name: "Amharic", value: LANGUAGES.am },
];

export type ConsentConfigMode = "required" | "disabled";

export const consentConfigOptions: { name: string; value: ConsentConfigMode }[] = [
{ name: "Required", value: "required" },
{ name: "Disabled", value: "disabled" },
];

export const defaultLoginMethod: Record<AUTH_CONNECTION_TYPE, ModalConfig> = loginProviderOptions.reduce(
(acc, curr) => ({
...acc,
Expand Down Expand Up @@ -128,6 +135,7 @@ export type FormData = {
};
connectors: string[];
initialAuthenticationMode: ConnectorInitialAuthenticationModeType;
consentConfigMode: ConsentConfigMode;
loginProviders: AUTH_CONNECTION_TYPE[];
showWalletDiscovery: boolean;
multiInjectedProviderDiscovery: boolean;
Expand Down
1 change: 1 addition & 0 deletions demo/vue-app-new/src/store/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const formDataStore = reactive<FormData>({
// authMode: "",
connectors: [],
initialAuthenticationMode: CONNECTOR_INITIAL_AUTHENTICATION_MODE.CONNECT_AND_SIGN,
consentConfigMode: "required",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i think consentConfigMode is set only on dashboard. not sure if we should include it on sdk config.

network: process.env.NODE_ENV === "production" ? WEB3AUTH_NETWORK.SAPPHIRE_MAINNET : WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
authBuildEnv: resolveBuildEnv(import.meta.env.VITE_APP_AUTH_BUILD_ENV),
chainNamespaces: [CHAIN_NAMESPACES.EIP155, CHAIN_NAMESPACES.SOLANA],
Expand Down
1 change: 1 addition & 0 deletions demo/vue-app-new/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"loginProviders": "Login provider",
"connectors": "Connectors",
"initialAuthenticationMode": "Authentication Mode",
"consentConfig": "Consent Config",
"showWalletDiscovery": "Show Wallet Discovery",
"multiInjectedProviderDiscovery": "Multi Injected Provider Discovery",
"externalWalletOnly": "External Wallet Only (Hide Social Login)",
Expand Down
10 changes: 5 additions & 5 deletions demo/wagmi-react-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/wagmi-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@tanstack/react-query": "^5.95.2",
"@web3auth/auth": "^11.5.0",
"@web3auth/auth": "^11.6.0",
"@web3auth/modal": "file:../../packages/modal",
"react": "^19.2.4",
"react-dom": "^19.2.4",
Expand Down
Loading
Loading