diff --git a/README.md b/README.md
index 42309e7998..36d1f87c0e 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,7 @@
* [Other Web panels](#other-web-panels)
* [Dashboards](#dashboards)
* [PWA support](#pwa-support)
+- [Two-factor authentication](#two-factor-authentication)
- [Mobile app](#mobile-app)
- [Browser extension](#browser-extension)
- [Tests](#tests)
@@ -1247,6 +1248,16 @@ PWA (progressive web app) to work. The Platypush PWA allows you to install a
Platypush native-like client on your mobile devices if you don't want to use the
full Android app.
+## Two-factor authentication
+
+Support for 2FA over OTP codes requires to enable the
+[`otp`](https://docs.platypush.tech/platypush/plugins/otp.html) and
+[`qrcode`](https://docs.platypush.tech/platypush/plugins/qrcode.html) plugins.
+
+After installing the dependencies, you can enable it by navigating to
+_Settings_ -> _Users_ from the Web panel. Then select your user, choose _Set up
+2FA_ and proceed with the steps on screen to set up your authenticator.
+
## Mobile app
An [official Android
diff --git a/platypush/backend/http/webapp/src/components/Modal.vue b/platypush/backend/http/webapp/src/components/Modal.vue
index 0984f6e2a9..8f16f72624 100644
--- a/platypush/backend/http/webapp/src/components/Modal.vue
+++ b/platypush/backend/http/webapp/src/components/Modal.vue
@@ -89,6 +89,10 @@ export default {
this.isVisible = true
},
+ open() {
+ this.show()
+ },
+
toggle() {
if (this.isVisible)
this.close()
diff --git a/platypush/backend/http/webapp/src/components/panels/Settings/Otp.vue b/platypush/backend/http/webapp/src/components/panels/Settings/Otp.vue
new file mode 100644
index 0000000000..99174480cd
--- /dev/null
+++ b/platypush/backend/http/webapp/src/components/panels/Settings/Otp.vue
@@ -0,0 +1,468 @@
+
+
+ Two-factor authentication adds an extra layer of security to your
+ account. When enabled, you will need to enter a code from your
+ authenticator app in addition to your password.
+
+
+
+
+
2FA Configuration
+
+
+
+
+
Scan the QR code with your authenticator app to add this account.
+
Alternatively, you can add either the secret or the provisioning
+ URL to your password manager or authenticator app.
+
+
+
+
+
+
+
+
Secret
+
+
+
+
+
Provisioning URL
+
+
+
+
+
+
Backup Codes
+
+
+
+
+
+ Backup Codes are one-time use codes that can be used to access
+ your account in case you lose access to your authenticator app.
+
+
Make sure to store them in a safe place.
+
+ Take note of these codes NOW! You will not be able to see them again!
+
+
+
+
+
+
+
+
+
+ Are you sure you want to regenerate the backup codes?
+
+
+
+
+
+
Are you sure you want to enable Two-Factor Authentication?
+
Make sure to save the secret and backup codes in a safe place.
+
+ In order to enable Two-Factor Authentication, you will need to enter
+ your password and a code from your authenticator app.
+
+
+
+
+
Are you sure you want to disable Two-Factor Authentication?
+
+ You will no longer need to enter a code from your authenticator app.
+ You will still need to enter your password to log in, but your
+ account may be less secure.
+
+
+
+ In order to disable Two-Factor Authentication, you will need to enter
+ your password.
+