Best Practices for MFA Setup
With Core Kit MFA and Plug and Play SDKs, you have the choice to use multiple types of multi-factor flows according to your needs. With Plug and Play, we expose various logins out of the box. For Core Kit SDKs, the developers can determine which flow suits them the most, with total freedom of managing key storage and access.
MFA Type | Custodiality of MFA | Ease of Access | Setup Custodiality | Availability in Plug and Play SDKs |
---|---|---|---|---|
Recovery Mnemonic Phrase | Self Custodial to User | Difficult | Fully Non-Custodial | Yes |
Email Backup Share | Potentially Custodial to Email Provider | Medium | Non-Custodial / Semi-Custodial (if same email as first factor social login) | Yes, SMTP server for email can be customized for Enterprise Customers. |
Backup Password | Semi Custodial to the Encrypted Metadata Server | Medium | Non-Custodial | Yes |
Secondary Social Login | Semi Custodial to Social Provider | Easy | Non-Custodial / Semi-Custodial (if same social login provider for first factor) | Yes, with Default Social Providers |
SMS Passwordless | Semi Custodial to SMS Service | Easy | Non-Custodial | Yes, with Web3Auth SMS Server |
Email Passwordless | Semi Custodial to Email Provider | Easy | Non-Custodial / Semi-Custodial (if same email as first factor social login) | Yes, with Web3Auth Email Passwordless Server |
Passkeys | Non Custodial | Easy | Non-Custodial | Yes, with Web3Auth Passkeys Server |
Authenticator App | Non Custodial | Easy | Non-Custodial | Yes, with Web3Auth Authenticator Server |
Setting up the Threshold for MFA
Web3Auth recommends Progressive Discoverability for user onboarding, allowing users to explore applications before introducing Multi-Factor Authentication (MFA). While the timing depends on the dApp's user flow, this method emphasizes seamless integration. Below are the three key pillars of Web3Auth's approach:
- User Experience: A one-click onboarding experience with familiar web2-like user interactions
- Accessibility: Onboarding flows tailored to the dApp’s security needs which could be one-click login or enhanced security login that requires setting up an additional share
- Non-Custodial: Web3Auth ensures full user control by not storing keys or data on its servers. Hence, it's important that users understand the implications of MFA.
Triggering MFA setup
The ideal time to trigger MFA is when users are familiar with the application and ready to enhance their account security. While this timing isn't fixed, dApps can choose when to initiate MFA based on user behavior. With our SDKs, you have control over this: by setting the MFALevel parameter in the Plug and Play SDKs or manually via the CoreKit SDKs.
dApp Shares
An alternative approach to MFA involves creating dApp Shares, which complement Share B and form half of the private key. The dApp securely stores this share in its local storage, allowing users to log in using their social media accounts to retrieve the other share. This eliminates the need to store shares in the browser context, ensuring a smoother login experience.
It's important to understand that dappShare
is exclusively for custom verifiers
and can't be
used with standard Web3Auth verifiers. Moreover, only users who have enabled MFA
can access
it. To use dApp Share, you need to use the custom authentication feature of Web3Auth. This
guarantees that an application can only access the share corresponding to a user's private key.
Implement diverse recovery methods
Implement diverse recovery methods, such as social login, trusted devices, and recovery phrases, to cater to various user preferences and scenarios. With the Plug-and-Play SDKs, Web3Auth offers three default options for account recovery.
However, it's essential to strike a balance when creating recovery shares. While having multiple shares increases backup options for users, creating too many shares can pose a security risk.
Managing MFA factors for end users
After setting up MFA, it's crucial for users to stay informed about the factors they’ve configured and be able to manage the factors. Regularly prompting users to review and verify their MFA setup helps ensure it remains valid and functional.
Users can manage their MFA setup, including viewing and removing existing factors, through the Auth Dashboard. For more information, refer to the documentation here.