From f3282bf1458f33201648df5f2c0b1a00681cb873 Mon Sep 17 00:00:00 2001 From: Mohammad Shahbaz Alam Date: Wed, 27 Nov 2024 14:51:55 +0530 Subject: [PATCH] add agg verifier code --- docs/sdk/sfa/sfa-js/usage.mdx | 34 +++++++++++++++++++++++- src/common/sdk/sfa/_sfa_login_params.mdx | 2 +- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/sdk/sfa/sfa-js/usage.mdx b/docs/sdk/sfa/sfa-js/usage.mdx index 6220d238e..3a43a675c 100644 --- a/docs/sdk/sfa/sfa-js/usage.mdx +++ b/docs/sdk/sfa/sfa-js/usage.mdx @@ -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. | @@ -90,6 +90,16 @@ export interface TorusSubVerifierInfo { #### Usage + + + + ```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({ }); ``` + + + + +```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 `name@email.com` 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. + }, + ], +}); +``` + + + + + ## Get a native provider `provider()` diff --git a/src/common/sdk/sfa/_sfa_login_params.mdx b/src/common/sdk/sfa/_sfa_login_params.mdx index 88b3e72d0..704220163 100644 --- a/src/common/sdk/sfa/_sfa_login_params.mdx +++ b/src/common/sdk/sfa/_sfa_login_params.mdx @@ -15,7 +15,7 @@ import Tabs from "@theme/Tabs"; | Parameter | Description | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `verifier` | Details of the verifier. It's a mandatory parameter as a string. | +| `verifier` | Name of the verifier. It's a mandatory parameter as a string. | | `verifierId` | Verifier ID's value, `sub` or `email` value present in the idToken. It's a mandatory parameter as a string. | | `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 mandatory parameter as a string. | | `subVerifierInfoArray?` | Sub verifier info. It's an optional parameter as a TorusSubVerifierInfo[]. |