@tapni/auth 0.0.168 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/.vite/manifest.json +48 -10
  2. package/dist/Account-IR-XgmiM.js +153 -0
  3. package/dist/Apps-CQXLKu2F.js +112 -0
  4. package/dist/CustomApp-FxfYHVid.js +112 -0
  5. package/dist/General-BVjTsECb.js +477 -0
  6. package/dist/{QR-UQySwgoT.js → QR-B60f-H2Q.js} +11 -11
  7. package/dist/TapniAuth.es.js +1 -1
  8. package/dist/TapniAuth.umd.js +17 -17
  9. package/dist/index.css +193 -0
  10. package/dist/{install-KFv1Z6O7.js → install-BOPYSGGa.js} +3487 -3504
  11. package/dist/style.css +1 -1
  12. package/dist/{web-NrPZl3qD.js → web-XbruGdlD.js} +2 -5
  13. package/package.json +3 -3
  14. package/src/App.vue +6 -19
  15. package/src/components/{Language.vue → DELETE_Language.vue} +26 -16
  16. package/src/components/{LinkIcon.vue → DELETE_LinkIcon.vue} +1 -1
  17. package/src/components/{ModalOverlay.vue → DELETE_ModalOverlay.vue} +2 -2
  18. package/src/components/{OTP.vue → DELETE_OTP.vue} +3 -3
  19. package/src/main.js +1 -0
  20. package/src/mixins/DELETE_mfa-auth.mixin.js +53 -0
  21. package/src/mixins/auth.mixin.js +7 -1
  22. package/src/mixins/global.mixin.js +7 -0
  23. package/src/routes.js +27 -15
  24. package/src/store/auth.js +1 -1
  25. package/src/store/constants.js +2 -6
  26. package/src/store/locales/cn.js +1 -1
  27. package/src/store/locales/en.js +28 -3
  28. package/src/views/Account.vue +72 -110
  29. package/src/views/Apps.vue +106 -0
  30. package/src/views/CustomApp.vue +106 -0
  31. package/src/views/General.vue +192 -0
  32. package/src/views/Login.vue +27 -10
  33. package/src/views/QR.vue +1 -1
  34. package/src/views/Security.vue +322 -0
  35. package/src/views/Welcome.vue +10 -4
  36. package/dist/Account-uZVmDKkt.js +0 -113
  37. package/src/mixins/mfa-auth.mixin.js +0 -76
  38. package/src/views/MFA.vue +0 -117
  39. /package/dist/{web-L3jORB19.js → web-AXRKjAOB.js} +0 -0
  40. /package/dist/{web-5VtGcKeU.js → web-IFGkBi0t.js} +0 -0
  41. /package/dist/{web-AImUTDQQ.js → web-LIfHmYL2.js} +0 -0
package/src/views/MFA.vue DELETED
@@ -1,117 +0,0 @@
1
- <template>
2
- <div class="page-login content-boxed content-boxed-padding">
3
- <a v-if="isModal" @click="close" class="color-black pull-right pointer" style="margin-top: 0px; position: absolute; right: -20px; text-align: right;">
4
- <i class="font-17 color-black">
5
- <img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 35%;"/>
6
- </i>
7
- </a>
8
- <h4 style="text-align: center; width: 80%; margin: 0 auto; margin-top: 50px;">
9
- 2-Step Verification
10
- </h4>
11
- <br>
12
-
13
- <div class="qrCodeLoginContainer center-text">
14
-
15
- <div>
16
- Enable Multi-Factor Authentication
17
- <div class="ios-switch" style="display: inline-block;float: right">
18
- <input
19
- v-model="mfaEnable"
20
- type="checkbox"
21
- name="ios-switch"
22
- class="ios-switch-checkbox"
23
- :id="'mfa-open-switch'"
24
- />
25
- <label class="ios-switch-label" :for="'mfa-open-switch'"></label>
26
- </div>
27
- </div>
28
- <br>
29
- <div v-show="mfaEnable && !account.mfaEnabled" style="text-align: center;">
30
- <div id="qrCodeContainer"
31
- class="qrCodeRounded"
32
- style="max-width: 100%;"/>
33
- <br>
34
- <p class="bold pointer font-16 underline" @click="copy(otpSecret)"> {{ otpSecret }}</p>
35
- <br>
36
- <br>
37
- <div style="margin: 0 auto; width: 85%; text-align: center;">
38
- <h5 class="">Scan the QR code above or enter the secret key into your authenticator app.</h5>
39
- <br>
40
- </div>
41
- </div>
42
- <form @submit.prevent="validateMFA" v-if="account.mfaEnabled !== mfaEnable">
43
- <button
44
- type="submit"
45
- class="button black-button google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"
46
- >
47
- <span v-if="!loading">{{ ssoLang[appLanguage].continue }}</span>
48
- <span v-else class="button--loading button__loader"></span>
49
- </button>
50
- <a href="javascript:;" @click="cancelMFA">Cancel</a>
51
- </form>
52
- <div v-else style="margin: 0 auto; width: 100%; text-align: center;">
53
- <div>
54
- <h5 v-if="mfaEnable" class="">
55
- Your account is protected via <br> multi-factor authentication (MFA) ✅
56
- </h5>
57
- <h5 v-else class="">Protect your account from unauthorized access by enabling multi-factor authentication (MFA)</h5>
58
-
59
- <a class="half-top" href="javascript:;" @click="cancelMFA">Go Back to Account Settings</a>
60
- </div>
61
- </div>
62
- </div>
63
- </div>
64
- </template>
65
-
66
-
67
- <script>
68
- import MFAAuthMixin from "../mixins/mfa-auth.mixin";
69
- import AuthMixin from "../mixins/auth.mixin";
70
- import AuthService from '../services/AuthService'
71
- import to from "await-to-js";
72
- import {EventBus} from "@/store/event-bus.js";
73
-
74
- export default {
75
- name: "AuthMFA",
76
- mixins: [AuthMixin, MFAAuthMixin],
77
- props: {
78
- payload: {
79
- type: Object,
80
- default: {}
81
- },
82
- },
83
- mounted() {
84
- if (!this.isLoggedIn) this.$router.push('/login');
85
- },
86
- methods: {
87
- close () {
88
- EventBus.$emit('ssoEvent', {name: 'toggleAuthModal', data: true})
89
- },
90
- async submit() {
91
- let data = {
92
- otpToken: this.otpToken,
93
- otpSecret: this.otpSecret,
94
- enable: this.mfaEnable,
95
- };
96
-
97
- if (!this.mfaEnable) {
98
- delete data.otpSecret;
99
- }
100
-
101
- this.loading = true;
102
- const [err, response] = await to(AuthService.setMfa(data, this.$storex))
103
- this.loading = false;
104
- if (err) {
105
- EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
106
- return this.errorHandler(err)
107
- }
108
- if (response.data.success) {
109
- this.getAccountSettings();
110
- this.successSnack(response.data.message);
111
- }
112
- },
113
- }
114
- };
115
- </script>
116
-
117
- <style scoped></style>
File without changes
File without changes
File without changes