Skip to content

Commit

Permalink
Fix docs reported issues
Browse files Browse the repository at this point in the history
More to follow
  • Loading branch information
shahbaz17 committed Nov 15, 2024
1 parent 28826b8 commit 0d582c3
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 28 deletions.
19 changes: 17 additions & 2 deletions docs/sdk/pnp/web/adapters/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import ExtraLoginOptions from "@site/src/common/sdk/pnp/web/_extra-login-options
import CustomAuthenticationCoreExample from "@site/src/common/sdk/pnp/web/_custom-authentication-core-example.mdx";
import CustomAuthenticationWeb3AuthExample from "@site/src/common/sdk/pnp/web/_custom-authentication-web3auth-example.mdx";
import ConnectToExample from "@site/src/common/sdk/pnp/web/_connect-to-example.mdx";
import MFAMinimumPlan from "@site/src/common/docs/_mfa_minimum_plan.mdx";

## [`@web3auth/auth-adapter`](https://npmjs.com/package/@web3auth/auth-adapter)

Expand Down Expand Up @@ -144,10 +145,14 @@ their order. Currently, there are four values for `mfaLevel`:

We offer the following backup factors under `mfaSettings`:

<MFAMinimumPlan />

- `deviceShareFactor`,
- `backUpShareFactor`,
- `socialBackupFactor`, and
- `passwordFactor`.
- `socialBackupFactor`,
- `passwordFactor`,
- `authenticatorFactor`, and
- `passkeysFactor`.

### Example

Expand Down Expand Up @@ -179,6 +184,16 @@ const authAdapter = new AuthAdapter({
priority: 4,
mandatory: false,
},
authenticatorFactor: {
enable: true,
priority: 5,
mandatory: false,
},
passkeysFactor: {
enable: true,
priority: 6,
mandatory: false,
},
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/pnp/web/modal/mfa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enabled MFA on other dApps. This is because MFA cannot be turned off once it is

:::

<MFAMinimumPlan />
{/* <MFAMinimumPlan /> */}

## Installing Auth Adapter

Expand Down
9 changes: 8 additions & 1 deletion docs/sdk/pnp/web/modal/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Finally, with the Wallet Services Plugin, you can enable additional functionalit
- `showCheckout()` - Initiate Topup for the user.
- `showWalletConnectScanner()` - Show WalletConnect QR Code Scanner.
- `showWalletUI()` - Show Embedded Wallet UI.
- `showSwap()` - Show Swap UI.
- `showTransactionConfirmation()` - Show Transaction Confirmation UI.

## Logging in the User

Expand Down Expand Up @@ -148,7 +150,12 @@ local currency and specify the token to top up their wallet.
You can use the `showWalletUI` function to show the templated wallet UI services.
[Learn more about `showWalletUI`](/docs/sdk/pnp/web/wallet-services/usage#show-wallet-embedded-ui).

### Transaction Confirmatons Screen
### Swap Screen

You can use the `showSwap` function to show the Swap UI.
[Learn more about `showSwap`](/docs/sdk/pnp/web/wallet-services/usage#swap).

### Transaction Confirmation Screen

You can use the wallet services provider to integrate prebuilt transaction confirmation screens into
your application. Upon successful completion, you can retrieve the signature for the request.
Expand Down
4 changes: 2 additions & 2 deletions docs/sdk/pnp/web/no-modal/initialize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ const web3auth = new Web3AuthNoModal({

### Whitelabeling

Within the `uiConfig` parameter, you can configure the Web3Auth Modal according to your
Within the `uiConfig` parameter, you can configure the Web3Auth NoModal according to your
application's requirements. It accepts a `WhiteLabelData` object.

:::tip

This is just one of the aspects of whitelabeling you can achieve with Web3Auth. To know more
in-depth about how you can Whitelabel your application with Web3Auth Plug and Play Modal SDK, have a
look at our [Whitelabeling SDK Reference](/sdk/pnp/web/modal/whitelabel).
look at our [Whitelabeling SDK Reference](/sdk/pnp/web/no-modal/whitelabel).

:::

Expand Down
6 changes: 3 additions & 3 deletions src/common/docs/_mfa_minimum_plan.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:::note

This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this
SDK in a production environment is the **SCALE Plan**. You can use this feature in `sapphire_devnet`
for free.
`mfaSettings` is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to
use this SDK in a production environment is the **SCALE Plan**. You can use this feature in
`sapphire_devnet` for free.

:::
2 changes: 2 additions & 0 deletions src/common/sdk/pnp/web/_auth-adapter-intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ For customising the MFA settings, you need to pass on `mfaSettings` configuratio

Read more about `mfaSettings` in the [Multi Factor Authentication Section](./mfa) SDK Reference.

**Note: `mfaSettings` is available for SCALE and above plan users.**

:::

```tsx
Expand Down
23 changes: 9 additions & 14 deletions src/common/sdk/pnp/web/_auth-adapter-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ import Tabs from "@theme/Tabs";

| Variable | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientId` | You can get your clientId/projectId by registering your dapp on [developer dashboard](https://dashboard.web3auth.io) |
| `network` | network specifies the web3auth network to be used. |
| `buildEnv` | This parameter will be used to change the build environment of auth sdk. |
| `redirectUrl` | redirectUrl is the dapp's url where user will be redirected after login. Register this url at [developer dashboard](https://dashboard.web3auth.io) else initialization will give error. |
| `uxMode` | two uxModes are supported:- - `'POPUP'`: In this uxMode, a popup will be shown to user for login. - `'REDIRECT'`: In this uxMode, user will be redirected to a new window tab for login. Use of `'REDIRECT'` mode is recommended in browsers where popups might get blocked. |
| `clientId` | The unique identifier for your application. Obtain this by registering your dapp in the [Web3Auth Dashboard](https://dashboard.web3auth.io) |
| `network` | The Web3Auth network to be used. |
| `buildEnv` | This parameter will be used to change the build environment of auth sdk, mainly for testing purposes. default is `production`. |
| `redirectUrl` | The URL where users will be redirected after login. |
| `uxMode` | Two uxModes supported are:- `'popup'`: In this uxMode, a popup will be shown to user for login. Use `'redirect'`: In this uxMode, user will be redirected to a new window tab for login. Use of `'redirect'` mode is recommended in browsers where popups might get blocked. |
| `replaceUrlOnRedirect` | replaceUrlOnRedirect removes the params from the redirected url after login |
| `originData` | originData is used to verify the origin of dapp by iframe. You don't have to pass originData explicitly if you have registered your dapp at [developer dashboard](https://dashboard.web3auth.io). originData contains a signature of dapp's origin url which is generated using project's secret. |
| `loginConfig` | loginConfig enables you to pass your own login verifiers configuration for various loginProviders. loginConfig is key value map where each key should be a valid loginProvider and value should be custom configuration for that loginProvider. You can deploy your own verifiers from [developer dashboard](https://dashboard.web3auth.io) to use here. |
| `webauthnTransports` | webauthnTransport enables you to configure the transport type user can use for saving their share. This is only available for v1 users. |
| `sdkUrl` | sdkUrl is for internal development use only and is used to override the `network` parameter. |
| `dashboardUrl` | dashboardUrl is for internal development use only and is used to override the `buildEnv` parameter. |
| `whiteLabel` | options for whitelabling default auth modal. |
| `whiteLabel` | options for whitelabling default auth modal screens. |
| `storageServerUrl` | Specify a custom storage server url |
| `storageKey` | setting to "local" will persist social login session across browser tabs. How long should a login session last at a minimum in seconds |
| `sessionTime` | How long should a login session last at a minimum in seconds |
| `sessionNamespace` | This option is for internal use only in torus wallet and has no effect on user's login on other dapps. |
| `storageKey` | setting to "local" will persist social login session across browser tabs. |
| `sessionTime` | This is the sessionTime for the login session |
| `mfaSettings` | This parameter will be used to enable mfa factors and set priority on UI listing. List of factors available `deviceShareFactor` \| `backUpShareFactor` \| `socialBackupFactor` \| `passwordFactor` \| `passkeysFactor` \| `authenticatorFactor` |
| `useMpc` | This parameter will be used to use auth mpc |
| `useCoreKitKey` | This parameter will be used to select core kit key. |
| `useCoreKitKey` | Setting this boolean value to true will get you the core kit key. |

</TabItem>

Expand Down
Loading

0 comments on commit 0d582c3

Please sign in to comment.