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
|`verifier`| Name of the verifier. It's a `string` mandatory parameter. |
82
67
|`idToken`| A newly created `JWT Token` that has not already been sent to Web3Auth or a `Duplicate Token` error will be thrown. It's a `string` mandatory parameter. |
verifier:"verifier-name", // e.g. `web3auth-sfa-verifier` replace with your verifier name, and it has to be on the same network passed in init().
113
-
verifierId:"verifier-id-value", // e.g. `Yux1873xnibdui` or `[email protected]` replace with your verifier id(sub or email)'s value.
114
-
idToken:"JWT Token", // replace with your newly created unused JWT Token.
97
+
// Get the verifier name from the Web3Auth Dashboard
98
+
verifier:"YOUR_VERIFIER_NAME",
99
+
// Pass the JWT token verification value selected for verifier.
100
+
verifierId:"YOUR_VERIFIER_ID",
101
+
// Pass your JWT token
102
+
idToken:"YOUR_JWT_TOKEN",
115
103
});
116
104
```
117
105
@@ -121,13 +109,18 @@ await web3auth.connect({
121
109
122
110
```js
123
111
awaitweb3auth.connect({
124
-
verifier:"aggregate-verifier-name", // e.g. `web3auth-aggregate-verifier` replace with your verifier name, and it has to be on the same network passed in init().
125
-
verifierId:"verifier-id-value", // e.g. `Yux1873xnibdui` or `[email protected]` replace with your verifier id(sub or email)'s value.
126
-
idToken:"JWT Token", // replace with your newly created unused JWT Token.
112
+
// Get the aggregate verifier name from the Web3Auth Dashboard
113
+
verifier:"YOUR_AGGREGATE_VERIFIER_NAME",
114
+
// Pass the JWT token verification value selected for sub verifier.
115
+
verifierId:"YOUR_VERIFIER_ID",
116
+
// Pass your JWT token
117
+
idToken:"YOUR_JWT_TOKEN",
127
118
subVerifierInfoArray: [
128
119
{
129
-
verifier:"sub-verifier-name", // e.g. `google`
130
-
idToken:"JWT Token", // replace with your newly created unused JWT Token.
120
+
// Get the sub verifier name from the Web3Auth Dashboard
121
+
verifier:"YOUR_SUB_VERIFIER_NAME",
122
+
// Pass the JWT token
123
+
idToken:"YOUR_JWT_TOKEN",
131
124
},
132
125
],
133
126
});
@@ -139,41 +132,40 @@ await web3auth.connect({
139
132
140
133
## Get a native provider
141
134
142
-
`provider()`
135
+
The method returns the provider instance that can be used to interact with different blockchain
136
+
networks. Please note, if there's no active session, the method will return `null`.
143
137
144
-
Returns the native provider that can be used to make different blockchain transactions.
138
+
Please refer to the [provider documentation](./providers/) for more details.
145
139
146
-
#### Returns
140
+
###Usage
147
141
148
142
```js
149
-
get provider(): IProvider |null;
143
+
constprovider=web3auth.provider;
144
+
// Use the provider to interact with the blockchain
150
145
```
151
146
152
147
## Get sessionId
153
148
154
-
`sessionId()`
149
+
The method returns the session id for the current active session as the string.
155
150
156
-
Returns the sessionId of the user as a string.
157
-
158
-
#### Returns
151
+
### Usage
159
152
160
153
```js
161
-
getsessionId(): string;
154
+
constsessionId=web3auth.sessionId;
162
155
```
163
156
164
157
## Authenticate the user
165
158
166
-
`authenticateUser()`
167
-
168
-
Returns a promise of the `UserAuthInfo` object containing the `idToken` of the user.
159
+
The method authenticates the connected user, and returns user auth info containing the Web3Auth JWT
160
+
token. You can use the idToken for backend verification.
0 commit comments