Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MPC CoreKit Docs #1028

Merged
merged 3 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions docs/sdk/mpc-core-kit/mpc-core-kit-js/authentication/login-jwt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ login function.

<TabItem value="table">

| Parameter | Description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `verifier` | Name of the verifier created on Web3Auth Dashboard. In the case of Aggregate Verifier, the name of the top-level aggregate verifier. |
| `verifierId` | Unique Identifier for the User. The verifier identifier field is set for the verifier/sub verifier. E.g. "sub" field in your JWT ID Token. |
| `idToken` | The idToken received from the Auth Provider. |
| `subVerifier?` | Name of the sub verifier in case of aggregate verifier setup. This field is mandatory in the case of an aggregate verifier. |
| `extraVerifierParams?` | Extra verifier params in case of a WebAuthn verifier type. |
| `additionalParams?` | Any additional parameter (key-value pair) you'd like to pass to the login function. |
| `importTssKey?` | Key to import key into TSS during first time login. For secp256k1 curve, you need to pass the private key, and for ed25519 curve you need to pass the seed. The ed25519 seed is hashed to generate 64 bytes, where first 32 bytes are used to generate the public key, and last 32 bytes are used as private key. |
| `prefetchTssPublicKeys?` | Defines the number of TSS public keys to prefetch.The SDK by default starts with 2/2 flow, and this parameter should be used in the flow where you want to generate the recovery factor during first time login. The parameters helps you to reduce the operation time by pre-fetching the TSS public key and use it during generating new shares. For existing user you can set it to `0`. Default is `1`, maximum is `3` |
| Parameter | Description |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `verifier` | Name of the verifier created on Web3Auth Dashboard. In the case of Aggregate Verifier, the name of the top-level aggregate verifier. |
| `verifierId` | Unique Identifier for the User. The verifier identifier field is set for the verifier/sub verifier. E.g. "sub" field in your JWT ID Token. |
| `idToken` | The idToken received from the Auth Provider. |
| `subVerifier?` | Name of the sub verifier in case of aggregate verifier setup. This field is mandatory in the case of an aggregate verifier. |
| `extraVerifierParams?` | Extra verifier params in case of a WebAuthn verifier type. |
| `additionalParams?` | Any additional parameter (key-value pair) you'd like to pass to the login function. |
| `importTssKey?` | Key to import key into TSS during first time login. For secp256k1 curve, you need to pass the private key, and for ed25519 curve you need to pass the seed. The ed25519 seed is hashed to generate 64 bytes, where first 32 bytes are used to generate the public key, and last 32 bytes are used as private key. |
| `prefetchTssPublicKeys?` | Defines the number of TSS public keys to prefetch.The SDK by default starts with 2/2 flow, and this parameter should be used in the flow where you want to generate the recovery factor during first time login. The parameters helps you to reduce the operation time by pre-fetching the TSS public key and use it during generating new shares. For existing user you can set it to `0`. Default is `1`, maximum is `3` |
| `registerExistingSFAKey?` | Allows to import the Single Factor Auth(SFA) Key into the MPC Core Kit SDK. Default value is `false`. Please note: <ul><li>Once SFA Key is imported, users won't be able to access their account using the SFA SDK.</li><li>SFA import can only be done for the Web3Auth SFA v2 users, and doesn't work for old(v1) users of SFA.</li></ul> |

</TabItem>
<TabItem value="type">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ An aggregate verifier helps to generate a same account across multiple verifiers
verification field. For instance if you are using Google, and Email Passwordless, and want to
genetate the same account across both authentication method, you need to use an aggregate verifier.

The `OAuthLoginParams` has two additional properties which can be used to customize the login flow.
Please check the table below for more details.

| Parameter | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `importTssKey?` | The TSS key to import an existing account. |
| `registerExistingSFAKey?` | Allows to import the Single Factor Auth(SFA) Key into the MPC Core Kit SDK. Default value is `false`. Please note: <ul><li>Once SFA Key is imported, users won't be able to access their account using the SFA SDK.</li><li>SFA import can only be done for the Web3Auth SFA v2 users, and doesn't work for old(v1) users of SFA.</li></ul> |

shahbaz17 marked this conversation as resolved.
Show resolved Hide resolved
### SubVerifierDetailsParams

Contains the details of the verifier the app needs to use for authentication. You need to use this
Expand Down
2 changes: 1 addition & 1 deletion src/common/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const sfaNodeJSVersion = `7.4.x`;
export const tkeyJSVersion = `15.x.x`;
export const tkeyAndroidVersion = `0.0.5`;
export const tkeyIOSVersion = `0.0.4`;
export const mpcCoreKitJSVersion = `3.2.x`;
export const mpcCoreKitJSVersion = `3.4.x`;

import {
web,
Expand Down
Loading