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