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 @@ +