Skip to content

Add detailed vX to v10 migration guides for Web3Auth #1144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
184 changes: 184 additions & 0 deletions docs/migration-guides/modal-v7-to-v10-custom-authentication.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---
title: Migrating Custom Authentication from v7 to v10
description:
Comprehensive guide for migrating Web3Auth custom authentication configurations from verifiers to
connections in v10.
sidebar_label: Custom Authentication Migration
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Web3Auth v10 Custom Authentication Migration Guide

This guide focuses specifically on migrating custom authentication configurations from Web3Auth v7
to v10. This covers the transition from "Verifiers" to "Connections" and "Grouped Connections". This
is a supplementary guide to the main [v7 to v10 migration guide](./modal-v7-to-v10.mdx).

## Overview

In v7, custom authentication used `verifier` and `aggregate verifier` configurations for linking
accounts from different social providers to the same underlying user wallet. In v10, this system is
streamlined with "Connections" and "Grouped Connections" configured on the Web3Auth Developer
Dashboard, significantly reducing client-side code complexity.

## Key Changes & Mapping

### 1. Single Verifiers (v7) to Single Connections (v10)

Single verifiers in v7 become connections in v10:

```typescript
// remove-start
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
loginConfig: {
google: {
verifier: "YOUR_GOOGLE_VERIFIER_NAME", // v7 verifier name
typeOfLogin: "google",
clientId: "YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com",
},
},
},
});

web3auth.configureAdapter(openloginAdapter);
await web3auth.initModal();
// remove-end

// add-start
const web3AuthOptions: Web3AuthOptions = {
clientId: "YOUR_CLIENT_ID",
// ...
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
loginMethods: {
google: {
name: "Google Login",
authConnectionId: "YOUR_GOOGLE_AUTH_CONNECTION_ID", // v10 connection ID
},
},
},
},
},
};

// OR v10: connectTo with a single connection
// await web3auth.connectTo(WALLET_CONNECTORS.AUTH, {
// authConnection: AUTH_CONNECTION.GOOGLE,
// authConnectionId: "YOUR_GOOGLE_AUTH_CONNECTION_ID",
// });
// add-end
```

#### Action

Your existing v7 single verifiers will be automatically migrated to "Connections" on the new
Web3Auth Developer Dashboard. Locate your migrated Connection, note its `authConnectionId`, and use
this ID in your v10 client code (`modalConfig` or `connectTo`). Remove any v7 `OpenloginAdapter`
configuration previously used for this verifier.

### 2. Aggregate Verifiers (v7) to Grouped Connections (v10)

Aggregate verifiers in v7 become grouped connections in v10:

```typescript
// remove-start
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
loginConfig: {
google: {
// Part of an aggregate verifier
verifier: "MY_AGGREGATE_VERIFIER_NAME", // Main aggregate verifier name
verifierSubIdentifier: "google-sub-verifier", // Specific sub-verifier for Google
typeOfLogin: "google",
clientId: "YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com",
},
jwt_email: {
// Another part of the same aggregate verifier
verifier: "MY_AGGREGATE_VERIFIER_NAME",
verifierSubIdentifier: "custom-jwt-sub-verifier",
typeOfLogin: "jwt",
clientId: "YOUR_CUSTOM_JWT_CLIENT_ID", // Not always applicable for JWT
jwtParameters: {
/* ... JWT specific params like domain, verifierIdField ... */
},
},
},
},
});

web3auth.configureAdapter(openloginAdapter);
await web3auth.initModal();
// remove-end

// add-start
const web3AuthOptions: Web3AuthOptions = {
clientId: "YOUR_CLIENT_ID",
// ...
modalConfig: {
connectors: {
[WALLET_CONNECTORS.AUTH]: {
loginMethods: {
google: {
name: "Google Login",
authConnectionId: "YOUR_INDIVIDUAL_GOOGLE_CONNECTION_ID", // ID of the individual Google connection
groupedAuthConnectionId: "YOUR_GROUPED_CONNECTION_ID_FROM_DASHBOARD", // ID of the group
},
myCustomJWT: {
name: "Login with Corp Email",
authConnectionId: "YOUR_INDIVIDUAL_CUSTOM_JWT_CONNECTION_ID",
groupedAuthConnectionId: "YOUR_GROUPED_CONNECTION_ID_FROM_DASHBOARD",
},
},
},
},
},
};

// OR v10: connectTo with a grouped connection
// For Google login part of the group:
// await web3auth.connectTo(WALLET_CONNECTORS.AUTH, {
// authConnection: AUTH_CONNECTION.GOOGLE,
// authConnectionId: "YOUR_INDIVIDUAL_GOOGLE_CONNECTION_ID",
// groupedAuthConnectionId: "YOUR_GROUPED_CONNECTION_ID_FROM_DASHBOARD",
// });

// For Custom JWT login part of the group:
// const idToken = await getMyIdToken();
// await web3auth.connectTo(WALLET_CONNECTORS.AUTH, {
// authConnection: AUTH_CONNECTION.CUSTOM,
// idToken: idToken,
// authConnectionId: "YOUR_INDIVIDUAL_CUSTOM_JWT_CONNECTION_ID",
// groupedAuthConnectionId: "YOUR_GROUPED_CONNECTION_ID_FROM_DASHBOARD",
// });
// add-end
```

You first create individual "Connections" on the dashboard for each auth provider (e.g., one for
Google, one for your custom JWT). Then, you create a "Grouped Connection" on the dashboard,
selecting the individual connections you want to group.

#### Action

1. Your existing v7 Aggregate Verifiers (and their sub-verifiers) will be automatically migrated to
the new v10 dashboard. They will appear as individual "Connections" that are part of a "Grouped
Connection".
2. On the v10 dashboard, locate your migrated Grouped Connection. Note its
`groupedAuthConnectionId`.
3. For each login method within that group, find the corresponding individual migrated Connection
and note its specific `authConnectionId`.
4. Update your v10 client code to use both the `groupedAuthConnectionId` (for the group) and the
specific `authConnectionId` (for the particular login method being invoked) in `modalConfig` or
`connectTo` calls. The v7 `verifierSubIdentifier` is no longer used in the client.

## Summary

This dashboard-centric approach, with automatic migration of existing verifiers, simplifies
client-side logic and provides a more robust way to manage authentication methods.

## Next Steps

Return to the main [v7 to v10 migration guide](./modal-v7-to-v10.mdx) to continue with other
migration aspects like method name changes and initialization updates.
92 changes: 92 additions & 0 deletions docs/migration-guides/modal-v7-to-v10-external-wallets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: Migrating External Wallets from v7 to v10
description: Comprehensive guide for migrating Web3Auth external wallet adapters from v7 to v10.
sidebar_label: External Wallet Adapters Migration
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Web3Auth v10 External Wallet Adapters Migration Guide

This guide focuses specifically on migrating external wallet adapter configurations from Web3Auth v7
to v10. This is a supplementary guide to the main
[v7 to v10 migration guide](./modal-v7-to-v10.mdx).

## Overview

In v7, external wallets required manual adapter configuration. V10 simplifies this by using MIPD
(Multiple Injected Provider Discovery) to automatically detect and provide access to external
wallets without manual setup.

## Migration Steps

### External Wallet Adapter Migration

```typescript
// remove-start
// Individual wallet adapters in v7
import { MetamaskAdapter } from "@web3auth/metamask-adapter";
import { PhantomAdapter } from "@web3auth/phantom-adapter";
import {
WalletConnectV2Adapter,
getWalletConnectV2Settings,
} from "@web3auth/wallet-connect-v2-adapter";
import { WalletConnectModal } from "@walletconnect/modal";

// Manual adapter configuration
const metamaskAdapter = new MetamaskAdapter();
web3auth.configureAdapter(metamaskAdapter);

const phantomAdapter = new PhantomAdapter();
web3auth.configureAdapter(phantomAdapter);

const defaultWcSettings = await getWalletConnectV2Settings("eip155", ["1"], "PROJECT_ID");
const walletConnectV2Adapter = new WalletConnectV2Adapter({
adapterSettings: { qrcodeModal: WalletConnectModal, ...defaultWcSettings.adapterSettings },
loginSettings: { ...defaultWcSettings.loginSettings },
});
web3auth.configureAdapter(walletConnectV2Adapter);

await web3auth.initModal();
// remove-end

// add-start
// All external wallets are automatically detected via MIPD
// No manual adapter configuration needed
await web3auth.init();
// add-end
```

## Key Changes

- **Package Removal**: Remove all external wallet adapter packages
- **MIPD Integration**: External wallets are automatically detected using MIPD (Multiple Injected
Provider Discovery)
- **No Configuration**: No need to manually configure or register external adapters
- **WalletConnect Support**: WalletConnect-compatible wallets are automatically available

## Package Removal

Remove these deprecated packages from your project:

```bash npm2yarn
# Remove all external wallet adapter packages
npm uninstall @web3auth/metamask-adapter @web3auth/phantom-adapter @web3auth/solflare-adapter @web3auth/wallet-connect-v2-adapter @walletconnect/modal
```

## How It Works in v10

V10 uses MIPD (Multiple Injected Provider Discovery) to automatically detect injected wallets in the
browser. When users attempt to connect, they'll see:

1. **Detected Wallets**: All installed browser extension wallets
2. **WalletConnect**: For mobile and other wallet connections
3. **Social Logins**: Built-in Web3Auth authentication methods

No configuration needed - everything works out of the box!

## Next Steps

Return to the main [v7 to v10 migration guide](./modal-v7-to-v10.mdx) to continue with other
migration aspects.
76 changes: 76 additions & 0 deletions docs/migration-guides/modal-v7-to-v10-wallet-services.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Migrating Wallet Services from v7 to v10
description: Comprehensive guide for migrating Web3Auth Wallet Services plugin from v7 to v10.
sidebar_label: Wallet Services Migration
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# Web3Auth v10 Wallet Services Migration Guide

This guide focuses specifically on migrating Wallet Services functionality from Web3Auth v7 to v10.
This is a supplementary guide to the main [v7 to v10 migration guide](./modal-v7-to-v10.mdx).

## Overview

In v7, Wallet Services (Checkout, Swap, WalletConnect Scanner, Embedded Wallet UI) required
installing and configuring a separate `@web3auth/wallet-services-plugin` package. V10 integrates
these services directly into the main SDK.

## Migration Steps

### Plugin Access Migration

```typescript
// remove-start
import { WalletServicesPlugin } from "@web3auth/wallet-services-plugin";

const walletServicesPlugin = new WalletServicesPlugin({
// plugin configuration options
});

web3auth.addPlugin(walletServicesPlugin);
await web3auth.initModal();

// Usage
await walletServicesPlugin.showWalletUi();
await walletServicesPlugin.showCheckout();
await walletServicesPlugin.showWalletConnectScanner();
// remove-end

// add-start
import { EVM_PLUGINS } from "@web3auth/modal";

await web3auth.init();

// Get the built-in wallet services plugin
const walletServicesPlugin = web3auth.getPlugin(EVM_PLUGINS.WALLET_SERVICES);

// Usage (methods now require { show: true } parameter)
await walletServicesPlugin.showWalletUi({ show: true });
await walletServicesPlugin.showCheckout({ show: true });
await walletServicesPlugin.showSwap({ show: true });
await walletServicesPlugin.showWalletConnectScanner({ show: true });
// add-end
```

## Key Changes

- **Package Removal**: Remove `@web3auth/wallet-services-plugin` package
- **Built-in Integration**: Wallet Services are now automatically included in the main SDK
- **Plugin Access**: Use `web3auth.getPlugin(EVM_PLUGINS.WALLET_SERVICES)` to access functionality
- **Parameter Updates**: Methods now require a `{ show: true }` parameter

## Package Removal

Remove the deprecated package from your project:

```bash npm2yarn
npm uninstall @web3auth/wallet-services-plugin
```

## Next Steps

Return to the main [v7 to v10 migration guide](./modal-v7-to-v10.mdx) to continue with other
migration aspects.
Loading