Two-Factor Authentication
Implementing secure wallet recovery with Two-Factor Authentication in Capsule
Capsule supports Two-Factor Authentication (2FA) for secure wallet recovery, adding an extra layer of security to your users’ accounts. This guide will walk you through the process of implementing 2FA in your application using Capsule.
Overview
Two-Factor Authentication is a security measure that requires users to provide two different authentication factors to verify their identity. In the context of Capsule, 2FA is used primarily for secure wallet recovery.
If you’re using the CapsuleModal
, 2FA is enabled by default. To disable this feature, refer to the
.
For developers using the Web and Mobile SDKs directly, Capsule provides several methods to implement 2FA. This guide will cover how to use these methods effectively.
Implementing 2FA
Here’s a step-by-step guide to implement 2FA in your application:
1. Check 2FA Status
Before setting up 2FA, you should check if it’s already enabled for the user:
2. Set Up 2FA
If 2FA isn’t set up, you can initiate the setup process:
The uri
returned by setup2FA()
can be used to generate a QR code or extracted to provide the secret key to the
user.
3. Enable 2FA
After the user has added the 2FA secret to their authenticator app, you need to verify and enable 2FA:
4. Verify 2FA
When authenticating, you’ll need to verify the user’s 2FA code:
Conclusion
Implementing Two-Factor Authentication with Capsule adds an essential layer of security to your application’s wallet recovery process. By following this guide and best practices, you can provide your users with a secure and user-friendly 2FA experience.
Was this page helpful?