Skip to content

Commit 5ff5fa0

Browse files
fix review comments
1 parent 22c612b commit 5ff5fa0

File tree

4 files changed

+55
-35
lines changed

4 files changed

+55
-35
lines changed

docs/sdk/core-kit/mpc-core-kit/authentication/login-jwt.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb";
105105

106106
### Single Verifier
107107

108+
To login with a single verifier, you will require to create a custom verifier in the Web3Auth
109+
dashboard. If you haven't already created one,
110+
[learn how to create a verifier](/docs/auth-provider-setup/byo-jwt-provider/#set-up-custom-jwt-verifier).
111+
108112
```tsx
109113
import { JWTLoginParams } from "@web3auth/mpc-core-kit";
110114

@@ -119,6 +123,10 @@ await coreKitInstance.loginWithJWT(jwtLoginParams);
119123

120124
### Aggregate Verifier
121125

126+
To login with an aggregate verifier, you will require to create an aggregate verifier in the
127+
Web3Auth dashboard. If you haven't already created one,
128+
[learn how to create an aggregate verifier](/docs/auth-provider-setup/aggregate-verifier#set-up-an-aggregate-verifier).
129+
122130
```tsx
123131
import { JWTLoginParams } from "@web3auth/mpc-core-kit";
124132

docs/sdk/core-kit/mpc-core-kit/authentication/login-oauth.mdx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ in the case of a single verifier.
4848

4949
<TabItem value="table">
5050

51-
| Parameter | Description |
52-
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
53-
| `typeOfLogin` | Type of login of this verifier, this value will affect the login flow that is adapted. Available options are `google`, `facebook`, `reddit`, `discord`, `twitch`, `apple`, `github`, `linkedin`, `twitter`, `weibo`, `line`, `email_password`, `passwordless`, `jwt`, `webauthn`. |
54-
| `verifier` | Name/ Identifier of the verifier/ sub verifier in case of aggregate verifiers, you'd like your app to use for authentication. |
55-
| `clientId` | Client Id given by the auth provider. Pass a random string in case you're connecting to a JWT based setup. |
56-
| `jwtParams?` | Additional parameters for the Auth0 login provider. |
57-
| `serverTimeOffset?` | The server time offset in seconds. Default value is 0. |
51+
| Parameter | Description |
52+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
53+
| `typeOfLogin` | Type of login of this verifier, this value will affect the login flow that is adapted. Available options are `LOGIN_TYPE.GOOGLE`, `LOGIN_TYPE.FACEBOOK`, `LOGIN_TYPE.REDDIT`, `LOGIN_TYPE.DISCORD`, `LOGIN_TYPE.TWITCH`, `LOGIN_TYPE.APPLE`, `LOGIN_TYPE.GITHUB`, `LOGIN_TYPE.LINKEDIN`, `LOGIN_TYPE.TWITTER`, `LOGIN_TYPE.WEIBO`, `LOGIN_TYPE.LINE`, and `LOGIN_TYPE.PASSWORDLESS`. |
54+
| `verifier` | Name/ Identifier of the verifier/ sub verifier in case of aggregate verifiers, you'd like your app to use for authentication. |
55+
| `clientId` | Client Id given by the auth provider. Pass a random string in case you're connecting to a JWT based setup. |
56+
| `jwtParams?` | Additional parameters for the Auth0 login provider. |
57+
| `serverTimeOffset?` | The server time offset in seconds. Default value is 0. |
5858

5959
</TabItem>
6060

@@ -115,11 +115,11 @@ use this in case of an aggregate verifier.
115115

116116
<TabItem value="table">
117117

118-
| Parameter | Description |
119-
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
120-
| `aggregateVerifierIdentifier` | The name of your aggregate verifier. Get it from the [dashboard](https://dashboard.web3auth.io/). |
121-
| `subVerifierDetailsArray` | An array containing the details of your sub verifiers. |
122-
| `aggregateVerifierType?` | Defines the type of aggregation required for your aggregate verifier. Use `"single_id_verifier"` by default in most cases. |
118+
| Parameter | Description |
119+
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120+
| `aggregateVerifierIdentifier` | The name of your aggregate verifier. Get it from the [dashboard](https://dashboard.web3auth.io/). |
121+
| `subVerifierDetailsArray` | An array containing the details of your sub verifiers. |
122+
| `aggregateVerifierType?` | Defines the type of aggregation required for your aggregate verifier. You need to use `single_id_verifier` by default in most cases. This parameter allows you define the number of verifier ids to be used for aggregation. |
123123

124124
</TabItem>
125125

@@ -143,6 +143,10 @@ export type AGGREGATE_VERIFIER_TYPE = (typeof AGGREGATE_VERIFIER)[keyof typeof A
143143

144144
### Single Verifier
145145

146+
To login with a single verifier, you will require to create a custom verifier in the Web3Auth
147+
dashboard. If you haven't already created one,
148+
[learn how to create a verifier](/docs/auth-provider-setup/verifiers).
149+
146150
```tsx
147151
import { SubVerifierDetailsParams } from "@web3auth/mpc-core-kit";
148152

@@ -159,6 +163,10 @@ await coreKitInstance.loginWithOAuth(verifierConfig);
159163

160164
### Aggregate Verifier
161165

166+
To login with an aggregate verifier, you will require to create an aggregate verifier in the
167+
Web3Auth dashboard. If you haven't already created one,
168+
[learn how to create an aggregate verifier](/docs/auth-provider-setup/aggregate-verifier#set-up-an-aggregate-verifier).
169+
162170
```tsx
163171
import { AggregateVerifierLoginParams } from "@web3auth/mpc-core-kit";
164172

docs/sdk/core-kit/mpc-core-kit/mpc-core-kit.mdx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@ description: "Web3Auth MPC Core Kit JS SDK | Documentation - Web3Auth"
77
import Image1 from "@site/static/images/tkey-mpc-flow.png";
88

99
Web3Auth's [`@web3auth/mpc-core-kit`](https://github.com/Web3Auth/mpc-core-kit) SDK is simple and
10-
easy-to-use SDK, that helps you implement Web3Auth's MPC features while giving you the flexibility
11-
to customize the UI and UX of the authentication process.
10+
easy-to-use SDK, that helps you implement Web3Auth's MPC Threshold Signature Scheme (TSS) features
11+
in which the private key is never reconstructed.
1212

13-
Compared to other Web3Auth SDKs, such as Plug and Play(PnP), and Single Factor Auth(SFA) SDKs, the
14-
private key is never reconstructed in the MPC Core Kit. Instead it uses the TSS (Threshold Signature
15-
Scheme) to generate the final signature.
13+
Compared to other Web3Auth SDKs, such as Plug and Play(PnP), and Single Factor Auth(SFA) SDKs where
14+
the private key is securely reconstructed on user's device, and is used to sign transactions. In the
15+
MPC TSS architecture, the private key is never reconstructed.
16+
17+
Instead, the partial key shares are stored at different locations which are used to generate the
18+
partial signatures. The final signature is generated combining the partial signatures using the TSS.
19+
Since the private key is never reconstructed, it's more secure approach.
1620

1721
:::info
1822

19-
The minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production
20-
environment is the **Enterprise Plan**. However, you can use this SDK with all features enabled in
21-
`sapphire_devnet` for free.
23+
The SDK is only available for the [Enterprise Plan](https://web3auth.io/pricing.html). However, you
24+
can test the SDK with all features enabled in the `sapphire_devnet`.
2225

2326
:::
2427

@@ -58,10 +61,10 @@ transactions on the blockchain. Let's understand each of these stages in detail.
5861

5962
### Hashed Cloud Factor
6063

61-
The MPC Core Kit SDK starts in a 2/2 flow by default. This means that the user will have to generate
62-
a social login factor and SDK will generate a hashed cloud factor. This hashed cloud factor is
63-
derived on the SDK front end and stored in the encrypted metadata server. This enables the user to
64-
start the login process from any device without creating an MFA factor.
64+
The MPC Core Kit SDK starts in a 2/2 flow by default. This means when user's logs in, a social login
65+
factor is generated and at the same time SDK will generate a hashed cloud factor. This hashed cloud
66+
factor is derived on the front end and stored in the encrypted metadata server. Please refer to the
67+
above architecture to understand more about factors.
6568

6669
This is done to make sure the user can access their account from any device without having to
6770
generate a new factor. The hashed cloud factor is deleted when the user enables the MFA.

docs/sdk/core-kit/mpc-core-kit/usage.mdx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Please, note we for the simplicity, we use the `coreKitInstance` to refer to the
2222
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
2323
| [loginWithJWT](#login-with-jwt) | Logs in the user with a JWT-based ID Token. We recommend using this method to authenticate users for better performance. |
2424
| [loginWithOAuth](#login-with-oauth) | Logs in the user using OAuth Flow, this function underneaths uses the CustomAuth flow to authenticate the user. |
25-
| [inputFactorKey](#input-factor-key) | This method can be used to input the factor key, for instance when threshold is not satisfied. |
26-
| [logout](#logout) | This methods logs out the user and invalidates the session. |
2725
| [handleRedirectResult](#handle-redirect-result) | Handles the redirect result from OAuth Flow. |
26+
| [inputFactorKey](#login-with-existing-factor) | This method can be used to login with the exisitng factor key, for instance when threshold is not satisfied. |
27+
| [logout](#logout) | This methods logs out the user and invalidates the session. |
2828

2929
:::info Get help with Authentication
3030

@@ -79,25 +79,26 @@ SDK.
7979

8080
### Login with OAuth
8181

82-
This method helps to Log in the user using OAuth flow. Please refer to the
82+
This method helps to Log in the user using OAuth flow. You can choose your preferred social auth
83+
providers with 0Auth login flow. Please refer to the
8384
[authentication section](/sdk/core-kit/mpc-core-kit/authentication/login-oauth) section for more
8485
details.
8586

86-
### Login with JWT
87-
88-
Logs in the user with a JWT-based ID Token. We recommend using this method to authenticate users for
89-
better performance. For this method, you'll have to manage the authentication yourself, and Web3Auth
90-
will only verify the idToken passed. Please refer to the
91-
[authentication section](/sdk/core-kit/mpc-core-kit/authentication/login-jwt) for more details.
92-
9387
### Handle Redirect Result
9488

9589
This method helps you hanlde the redirect result form the OAuth Flow when the ux mode is redirect.
9690
By default, you won't require to use this method since we handle the redirect result internally. You
9791
can set the `handleRedirectResult` to false during initialization, and use this method to handle the
9892
redirect result.
9993

100-
### Input Factor Key
94+
### Login With JWT
95+
96+
Logs in the user with a JWT-based ID Token. We recommend using this method to authenticate users for
97+
better performance. For this method, you'll have to manage the authentication yourself, and Web3Auth
98+
will only verify the idToken passed. Please refer to the
99+
[authentication section](/sdk/core-kit/mpc-core-kit/authentication/login-jwt) for more details.
100+
101+
### Login With Existing Factor
101102

102103
This method can be used to input the factor key, for instance when threshold is not satisfied. For
103104
example, if user's device factor is not present, this method can be used to input the back up factor

0 commit comments

Comments
 (0)