You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This migration guide provides steps for upgrading from version v9 to v10 of the Web3Auth PnP Modal
8
-
SDK. Version 10 introduces a simpler architecture by eliminating verifiers and adapters from the
9
-
frontend codebase, consolidating all configurations within the Web3Auth Developer Dashboard.
7
+
This migration guide provides steps for upgrading from version v9 to v10 of the Web3Auth PnP Modal SDK. Version 10 introduces a simpler architecture by eliminating verifiers and adapters from the frontend codebase, consolidating all configurations within the Web3Auth Developer Dashboard.
10
8
11
9
## Breaking Changes
12
10
13
11
### 1. `verifier` and `verifierSubIdentifier` replaced with `authConnectionId` and `groupedAuthConnectionId`
14
12
15
-
In v9, aggregating social logins to return the same account (for the same user email) required using
16
-
an aggregate verifier with `verifierSubIdentifier`:
13
+
In v9, aggregating social logins to return the same account (for the same user email) required using an aggregate verifier with `verifierSubIdentifier`:
17
14
18
15
```ts title="v9 - Before"
19
16
loginConfig: {
@@ -32,8 +29,7 @@ loginConfig: {
32
29
}
33
30
```
34
31
35
-
In v10, this logic is now abstracted to the dashboard. Use `authConnectionId` for each provider and
36
-
group them using the new `groupedAuthConnectionId`:
32
+
In v10, this logic is now abstracted to the dashboard. Use `authConnectionId` for each provider and group them using the new `groupedAuthConnectionId`:
37
33
38
34
```ts title="v10 - After"
39
35
modalConfig: {
@@ -57,8 +53,7 @@ modalConfig: {
57
53
}
58
54
```
59
55
60
-
> ✅ This results in the same user account when logging in with Google or GitHub using the same
61
-
> email, no additional setup needed in code.
56
+
> ✅ This results in the same user account when logging in with Google or GitHub using the same email, no additional setup needed in code.
62
57
63
58
---
64
59
@@ -110,8 +105,7 @@ const web3auth = new Web3Auth({
110
105
});
111
106
```
112
107
113
-
In v10, all chain settings are handled via the dashboard. These parameters are no longer required or
114
-
accepted:
108
+
In v10, all chain settings are handled via the dashboard. These parameters are no longer required or accepted:
115
109
116
110
```ts title="v10 - After"
117
111
const web3auth =newWeb3Auth({
@@ -156,8 +150,7 @@ await web3auth.initModal({
156
150
});
157
151
```
158
152
159
-
In v10, the configuration is moved into the constructor. `initModal()` is still required but without
160
-
parameters:
153
+
In v10, the configuration is moved into the constructor. `initModal()` is still required but without parameters:
161
154
162
155
```ts title="v10 - After"
163
156
const web3auth =newWeb3Auth({
@@ -185,6 +178,59 @@ await web3auth.initModal();
185
178
186
179
---
187
180
181
+
### 5. Changes to Modal Hooks (`useWeb3Auth`)
182
+
183
+
In v9, you had to create a full `Web3AuthContextConfig` and pass `adapters`, `plugins`, and `privateKeyProvider`:
0 commit comments