Welcome to mirror list, hosted at ThFree Co, Russian Federation.

settings.vue « view « js - github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a75a20442ae4fab117504b7e163221af05291d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
    <div class="section">
        <h2 data-anchor-name="totp-second-factor-auth">SMS second-factor auth</h2>
        <p v-if="state === 0">
            You are not using SMS-based two-factor authentication at the moment.
            <button @click="enable">Enable</button>
        </p>
        <p v-if="state === 1">
            A confirmation code has been sent to …. Please check your phone and insert the code here: …
            <input v-model="confirmationCode">
            <button @click="confirm">Confirm</button>
        </p>
        <p v-if="state === 2">
            SMS-based two-factor authentication is enabled for your account.
        </p>
    </div>
</template>

<script>
export default {
  data() {
    return {
      state: 0,
      confirmationCode: ""
    };
  },
  methods: {
    enable: function() {
      this.state = 1;
    },
    confirm: function() {
      console.error(this.confirmationCode);

      this.state = 2;
    }
  }
};
</script>