aboutsummaryrefslogtreecommitdiff
path: root/src/components/auth_form
diff options
context:
space:
mode:
authorMaksim <parallel588@gmail.com>2019-06-12 20:16:55 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2019-06-12 20:16:55 +0000
commit77eceedbf7a5b53948d7d91b3d228aa303c02081 (patch)
tree560ecc4d370fda07c5da8cde5c60c679fa9c7862 /src/components/auth_form
parent9df99c5205b1cb560bb25c0dd81cc90acbde4d7f (diff)
Revert "add TOTP/Recovery Form for mobile version"
This reverts commit a3811f944819430c278b6da6b08dc322a9b9ff65.
Diffstat (limited to 'src/components/auth_form')
-rw-r--r--src/components/auth_form/auth_form.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/components/auth_form/auth_form.js b/src/components/auth_form/auth_form.js
new file mode 100644
index 00000000..e9a6e2d5
--- /dev/null
+++ b/src/components/auth_form/auth_form.js
@@ -0,0 +1,26 @@
+import LoginForm from '../login_form/login_form.vue'
+import MFARecoveryForm from '../mfa_form/recovery_form.vue'
+import MFATOTPForm from '../mfa_form/totp_form.vue'
+import { mapGetters } from 'vuex'
+
+const AuthForm = {
+ name: 'AuthForm',
+ render (createElement) {
+ return createElement('component', { is: this.authForm })
+ },
+ computed: {
+ authForm () {
+ if (this.requiredTOTP) { return 'MFATOTPForm' }
+ if (this.requiredRecovery) { return 'MFARecoveryForm' }
+ return 'LoginForm'
+ },
+ ...mapGetters('authFlow', ['requiredTOTP', 'requiredRecovery'])
+ },
+ components: {
+ MFARecoveryForm,
+ MFATOTPForm,
+ LoginForm
+ }
+}
+
+export default AuthForm