File tree Expand file tree Collapse file tree 4 files changed +53
-0
lines changed
Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ Web3Auth's Account Dashboard provides a unified platform for users to manage the
99Authentication (MFA) and account security with ease. This document provides an overview of its
1010features and how to integrate it seamlessly into your application.
1111
12+ :::tip
13+
14+ To implement the Account Dashboard in your custom verifier-based dApp, please refer to the
15+ [ Manage MFA for No Modal SDK] ( /sdk/pnp/web/no-modal/usage#manage-multi-factor-authentication-mfa )
16+ and [ Manage MFA for Modal SDK] ( /sdk/pnp/web/modal/usage#manage-multi-factor-authentication-mfa )
17+ sections.
18+
19+ :::
20+
1221![ Unified Recovery Management Screenshot] ( /images/account-dashboard/unified-recovery-management.jpg )
1322
1423### 1. Unified Recovery Management
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import ConnectBlockchain from "@site/src/common/sdk/pnp/web/_connect-blockchain.
1111import GetIdTokenInfo from " @site/src/common/sdk/pnp/web/_get-idtoken-info.mdx" ;
1212import GetUserInfo from " @site/src/common/sdk/pnp/web/_get-user-info.mdx" ;
1313import EnableMFA from " @site/src/common/sdk/pnp/web/_enable-mfa.mdx" ;
14+ import ManageMFA from " @site/src/common/sdk/pnp/web/_manage-mfa.mdx" ;
1415import LogOut from " @site/src/common/sdk/pnp/web/_logout.mdx" ;
1516import SwitchChain from " @site/src/common/sdk/pnp/web/_switch-chain.mdx" ;
1617import Status from " @site/src/common/sdk/pnp/web/_status-method.mdx" ;
@@ -28,6 +29,7 @@ following functions:
2829- ` connect() ` - Showing the Modal and Logging in the User
2930- ` getUserInfo() ` - Getting the User's Information
3031- ` enableMFA() ` - Enable Multi Factor Authentication for the user
32+ - ` manageMFA() ` - Redirect the user to manage their MFA settings in the Web3Auth Account Dashboard
3133- ` authenticateUser() ` - Getting the idToken from Web3Auth
3234- ` addChain() ` - Add chain config details to the connected adapter.
3335- ` switchChain() ` - Switch chain as per chainId already added to chain config.
@@ -100,6 +102,10 @@ Read more about connecting your users with the selected blockchain in the
100102
101103<EnableMFA />
102104
105+ ## Manage Multi Factor Authentication (MFA)
106+
107+ <ManageMFA />
108+
103109## Get idToken for Backend Verification
104110
105111<GetIdTokenInfo />
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Provider from "@site/src/common/sdk/pnp/web/_provider-method.mdx";
1313import ConnectedAdapterName from " @site/src/common/sdk/pnp/web/_connected-adapter-name-method.mdx" ;
1414import Connected from " @site/src/common/sdk/pnp/web/_connected-method.mdx" ;
1515import EnableMFA from " @site/src/common/sdk/pnp/web/_enable-mfa.mdx" ;
16+ import ManageMFA from " @site/src/common/sdk/pnp/web/_manage-mfa.mdx" ;
1617import ExtraLoginOptions from " @site/src/common/sdk/pnp/web/_extra-login-options.mdx" ;
1718import GetIdTokenInfo from " @site/src/common/sdk/pnp/web/_get-idtoken-info.mdx" ;
1819import GetUserInfo from " @site/src/common/sdk/pnp/web/_get-user-info.mdx" ;
@@ -33,6 +34,7 @@ the following functions:
3334- ` connectTo() ` - Logging in the User with the given Wallet Adapter and respective Login Parameters.
3435- ` getUserInfo() ` - Getting the User's Information.
3536- ` enableMFA() ` - Enable Multi Factor Authentication for the user.
37+ - ` manageMFA() ` - Redirect users to the Web3Auth Account Dashboard to manage their MFA settings.
3638- ` authenticateUser() ` - Getting the idToken from Web3Auth.
3739- ` addChain() ` - Add chain config details to the connected adapter.
3840- ` switchChain() ` - Switch chain as per chainId already added to the chain config.
@@ -144,6 +146,10 @@ options.
144146
145147<EnableMFA />
146148
149+ ## Manage Multi Factor Authentication (MFA)
150+
151+ <ManageMFA />
152+
147153## Get idToken
148154
149155<GetIdTokenInfo />
Original file line number Diff line number Diff line change 1+ import TabItem from " @theme/TabItem" ;
2+ import Tabs from " @theme/Tabs" ;
3+
4+ #### ` manageMFA() `
5+
6+ You can redirect users to the Web3Auth Account Dashboard to manage their MFA settings by calling the
7+ ` manageMFA() ` function. This method ensures that identity details are injected into the dashboard
8+ internally for custom verifier-based dApps. In order to see what's present on the account dashboard,
9+ please refer to the [ Account Dashboard] ( /features/account-dashboard ) .
10+
11+ ``` javascript
12+ await web3auth .manageMFA ();
13+ ```
14+
15+ #### Interface
16+
17+ ``` typescript
18+ manageMFA <T >(loginParams ?: T ): Promise < void > ;
19+ ```
20+
21+ - ** ` loginParams ` ** (optional): Optional parameters to include during the MFA management process.
22+ - ** Returns** : A ` Promise<void> ` indicating successful redirection to the Account Dashboard.
23+
24+ :::tip
25+
26+ If MFA is not already enabled, the ` manageMFA() ` method will throw an error. Ensure you use
27+ ` enableMFA() ` before calling ` manageMFA() ` .
28+
29+ If your dApp uses default verifiers, users can directly log in to the Account Dashboard to manage
30+ MFA. For custom verifier-based dApps, the ` manageMFA() ` method must be used.
31+
32+ :::
You can’t perform that action at this time.
0 commit comments