-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ On unsuccessful login, this function will return a `null` value. | |
|
||
| Parameter | Description | | ||
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `verifier` | Details of the verifier (verifier type, ie. `torus`, `metamask`, `auth` etc.). It's a `string` mandatory parameter. | | ||
| `verifier` | Name of the verifier. It's a `string` mandatory parameter. | | ||
| `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. | | ||
|
||
</TabItem> | ||
|
@@ -90,6 +90,16 @@ export interface TorusSubVerifierInfo { | |
|
||
#### Usage | ||
|
||
<Tabs | ||
defaultValue="single" | ||
values={[ | ||
{ label: "Single Verifier", value: "single" }, | ||
{ label: "Aggregate Verifier", value: "aggregate" }, | ||
]} | ||
> | ||
|
||
<TabItem value="single"> | ||
|
||
```js | ||
await web3auth.connect({ | ||
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(). | ||
|
@@ -98,6 +108,28 @@ await web3auth.connect({ | |
}); | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="aggregate"> | ||
|
||
```js | ||
await web3auth.connect({ | ||
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(). | ||
verifierId: "verifier-id-value", // e.g. `Yux1873xnibdui` or `[email protected]` replace with your verifier id(sub or email)'s value. | ||
idToken: "JWT Token", // replace with your newly created unused JWT Token. | ||
subVerifierInfoArray: [ | ||
{ | ||
verifier: "sub-verifier-name", // e.g. `google` | ||
idToken: "JWT Token", // replace with your newly created unused JWT Token. | ||
}, | ||
], | ||
}); | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
## Get a native provider | ||
|
||
`provider()` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters