@tapni/auth 1.0.8 → 1.0.9

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 (50) hide show
  1. package/README.md +2 -0
  2. package/dist/.vite/manifest.json +12 -12
  3. package/dist/.well-known/assetlinks.json +10 -12
  4. package/dist/.well-known/microsoft-identity-association.json +5 -5
  5. package/dist/{Apps-aanvwc1E.js → Apps-spt3-xmr.js} +1 -1
  6. package/dist/{Billing-C7LjeXBV.js → Billing-EQtSRyls.js} +1 -1
  7. package/dist/{CustomApp-Cd00FwXJ.js → CustomApp-DytcodWc.js} +1 -1
  8. package/dist/{General-DH-AnLIA.js → General-BBoC_TV2.js} +1 -1
  9. package/dist/{QR-cfWsMTIZ.js → QR-DmSyXgb5.js} +1 -1
  10. package/dist/TapniAuth.es.js +1 -1
  11. package/dist/TapniAuth.umd.js +8 -8
  12. package/dist/blank.html +31 -0
  13. package/dist/{install-CBFqB-tX.js → install-DJ7V1wyP.js} +761 -744
  14. package/dist/site.webmanifest +11 -1
  15. package/dist/style.css +1 -1
  16. package/package.json +14 -4
  17. package/src/.prettierrc.json +16 -0
  18. package/src/components/DELETE_LinkIcon.vue +174 -225
  19. package/src/components/DELETE_SSOPick.vue +93 -148
  20. package/src/eslint.config.js +15 -0
  21. package/src/install.js +9 -10
  22. package/src/main.js +54 -57
  23. package/src/mixins/apple.mixin.js +56 -54
  24. package/src/mixins/auth.mixin.js +3 -2
  25. package/src/mixins/global.mixin.js +2 -2
  26. package/src/mixins/google.mixin.js +53 -54
  27. package/src/mixins/qr-auth.mixin.js +111 -107
  28. package/src/router/index.js +6 -6
  29. package/src/routes.js +1 -1
  30. package/src/services/Api.js +55 -57
  31. package/src/services/CompanyService.js +10 -10
  32. package/src/services/DeviceService.js +3 -3
  33. package/src/services/UserService.js +45 -45
  34. package/src/services/UtilService.js +256 -218
  35. package/src/store/event-bus.js +22 -22
  36. package/src/store/locales/cn.js +442 -458
  37. package/src/store/locales/de.js +438 -517
  38. package/src/store/locales/es.js +442 -524
  39. package/src/store/locales/fr.js +442 -516
  40. package/src/store/locales/it.js +442 -514
  41. package/src/store/locales/kr.js +442 -491
  42. package/src/store/locales/lang.js +43 -43
  43. package/src/store/locales/sr.js +439 -492
  44. package/src/store/locales/tr.js +436 -487
  45. package/src/store/store.js +6 -6
  46. package/src/views/Account.vue +2 -2
  47. package/src/views/Callback.vue +36 -33
  48. package/src/views/Login.vue +3 -3
  49. package/src/views/Reset.vue +132 -135
  50. package/src/views/Verify.vue +153 -151
@@ -1,166 +1,111 @@
1
1
  <template>
2
- <form
3
- @submit.prevent
4
- class="menu-wrapper menu-light menu-modal center-text activate-page"
5
- :class="{ 'active-menu': toggle }"
6
- style="height: auto; margin-top: -172.5px"
7
- >
8
- <a
9
- @click="forceClose"
10
- class="color-black pull-right pointer"
11
- style="margin-top: 5px; position: absolute; right: 5px"
12
- >
13
- <i class="font-17 color-black">
14
- <img
15
- src="https://cdn.tapni.co/icons/down-arrow.png"
16
- class="responsive-image"
17
- style="width: 45%"
18
- />
19
- </i>
20
- </a>
21
- <h3 class="bold center-text color-black half-top half-bottom">
22
- {{ ssoLang[appLanguage].select_sign_method }}
23
- </h3>
2
+ <form @submit.prevent class="menu-wrapper menu-light menu-modal center-text activate-page" :class="{ 'active-menu': toggle }" style="height: auto; margin-top: -172.5px">
3
+ <a @click="forceClose" class="color-black pull-right pointer" style="margin-top: 5px; position: absolute; right: 5px">
4
+ <i class="font-17 color-black">
5
+ <img src="https://cdn.tapni.co/icons/down-arrow.png" class="responsive-image" style="width: 45%" />
6
+ </i>
7
+ </a>
8
+ <h3 class="bold center-text color-black half-top half-bottom">
9
+ {{ ssoLang[appLanguage].select_sign_method }}
10
+ </h3>
24
11
 
25
- <!-- Azure Login Button -->
26
- <a
27
- v-if="sso?.azure"
28
- @click="ssoLogin('azure')"
29
- class="button-center button black-button button-90 google-button pointer"
30
- >
31
- <img
32
- src="https://cdn.tapni.co/icons/azure.png"
33
- style="
34
- position: absolute;
35
- margin-left: -11px;
36
- padding: 8px 0;
37
- height: 100%;
38
- "
39
- />
40
- <span v-if="!azureLoad"
41
- >{{ ssoLang[appLanguage].sign_in_with }} Azure</span
42
- >
43
- <span v-else class="button--loading button__loader"></span>
44
- </a>
12
+ <!-- Azure Login Button -->
13
+ <a v-if="sso?.azure" @click="ssoLogin('azure')" class="button-center button black-button button-90 google-button pointer">
14
+ <img src="https://cdn.tapni.co/icons/azure.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
15
+ <span v-if="!azureLoad">{{ ssoLang[appLanguage].sign_in_with }} Azure</span>
16
+ <span v-else class="button--loading button__loader"></span>
17
+ </a>
45
18
 
46
- <!-- Okta Login Button -->
47
- <a
48
- v-if="sso?.okta"
49
- @click="ssoLogin('okta')"
50
- class="button-center button black-button button-90 google-button pointer"
51
- >
52
- <img
53
- src="https://cdn.tapni.co/icons/okta.png"
54
- style="
55
- position: absolute;
56
- margin-left: -11px;
57
- padding: 8px 0;
58
- height: 100%;
59
- "
60
- />
61
- <span v-if="!oktaLoad"
62
- >{{ ssoLang[appLanguage].sign_in_with }} Okta</span
63
- >
64
- <span v-else class="button--loading button__loader"></span>
65
- </a>
19
+ <!-- Okta Login Button -->
20
+ <a v-if="sso?.okta" @click="ssoLogin('okta')" class="button-center button black-button button-90 google-button pointer">
21
+ <img src="https://cdn.tapni.co/icons/okta.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
22
+ <span v-if="!oktaLoad">{{ ssoLang[appLanguage].sign_in_with }} Okta</span>
23
+ <span v-else class="button--loading button__loader"></span>
24
+ </a>
66
25
 
67
- <!-- SAML Login Button -->
68
- <a
69
- v-if="sso?.saml"
70
- @click="ssoLogin('saml')"
71
- class="button-center button black-button button-90 google-button pointer"
72
- >
73
- <img
74
- src="https://cdn.tapni.co/icons/saml.png"
75
- style="
76
- position: absolute;
77
- margin-left: -11px;
78
- padding: 8px 0;
79
- height: 100%;
80
- "
81
- />
82
- <span v-if="!samlLoad"
83
- >{{ ssoLang[appLanguage].sign_in_with }} SAML</span
84
- >
85
- <span v-else class="button--loading button__loader"></span>
86
- </a>
87
- </form>
26
+ <!-- SAML Login Button -->
27
+ <a v-if="sso?.saml" @click="ssoLogin('saml')" class="button-center button black-button button-90 google-button pointer">
28
+ <img src="https://cdn.tapni.co/icons/saml.png" style="position: absolute; margin-left: -11px; padding: 8px 0; height: 100%" />
29
+ <span v-if="!samlLoad">{{ ssoLang[appLanguage].sign_in_with }} SAML</span>
30
+ <span v-else class="button--loading button__loader"></span>
31
+ </a>
32
+ </form>
88
33
  </template>
89
34
 
90
35
  <script>
91
- import { EventBus } from "../store/event-bus";
92
- import MicrosoftMixin from "../mixins/microsoft.mixin";
93
- import OktaMixin from "../mixins/okta.mixin";
94
- import SamlMixin from "../mixins/saml.mixin";
95
- import AuthMixin from "../mixins/auth.mixin";
36
+ import { EventBus } from '../store/event-bus';
37
+ import MicrosoftMixin from '../mixins/microsoft.mixin';
38
+ import OktaMixin from '../mixins/okta.mixin';
39
+ import SamlMixin from '../mixins/saml.mixin';
40
+ import AuthMixin from '../mixins/auth.mixin';
96
41
  export default {
97
- name: "SSOPick",
98
- mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
99
- data() {
100
- return {
101
- toggle: false,
102
- sso: null,
103
- email: null,
104
- azureLoad: false,
105
- oktaLoad: false,
106
- samlLoad: false,
107
- };
108
- },
109
- mounted() {
110
- EventBus.$on("toggleSSOPickModal", this.toggleModal);
111
- EventBus.$on("closeModal", () => {
112
- this.toggle = false;
113
- });
114
- },
115
- beforeDestroy() {
116
- EventBus["_events"]["toggleSSOPickModal"].pop();
117
- },
118
- methods: {
119
- forceClose() {
120
- EventBus.$emit("closeModal");
121
- },
122
- close() {
123
- this.toggleModal();
124
- },
125
- async ssoLogin(type) {
126
- if (type === "azure") {
127
- this.microsoftLogin("sso", this.sso.azure.sso);
128
- this.azureLoad = true;
129
- }
130
- if (type === "okta") {
131
- this.oktaLogin(this.sso.okta.sso);
132
- this.oktaLoad = true;
133
- }
134
- if (type === "saml") {
135
- this.samlLogin(this.sso.saml.sso.loginUrl);
136
- this.samlLoad = true;
137
- }
138
- },
139
- toggleModal(data) {
140
- this.azureLoad = false;
141
- this.oktaLoad = false;
142
- this.samlLoad = false;
143
- this.sso = null;
144
- this.email = null;
42
+ name: 'SSOPick',
43
+ mixins: [MicrosoftMixin, OktaMixin, SamlMixin, AuthMixin],
44
+ data() {
45
+ return {
46
+ toggle: false,
47
+ sso: null,
48
+ email: null,
49
+ azureLoad: false,
50
+ oktaLoad: false,
51
+ samlLoad: false
52
+ };
53
+ },
54
+ mounted() {
55
+ EventBus.$on('toggleSSOPickModal', this.toggleModal);
56
+ EventBus.$on('closeModal', () => {
57
+ this.toggle = false;
58
+ });
59
+ },
60
+ beforeDestroy() {
61
+ EventBus['_events']['toggleSSOPickModal'].pop();
62
+ },
63
+ methods: {
64
+ forceClose() {
65
+ EventBus.$emit('closeModal');
66
+ },
67
+ close() {
68
+ this.toggleModal();
69
+ },
70
+ async ssoLogin(type) {
71
+ if (type === 'azure') {
72
+ this.microsoftLogin('sso', this.sso.azure.sso);
73
+ this.azureLoad = true;
74
+ }
75
+ if (type === 'okta') {
76
+ this.oktaLogin(this.sso.okta.sso);
77
+ this.oktaLoad = true;
78
+ }
79
+ if (type === 'saml') {
80
+ this.samlLogin(this.sso.saml.sso.loginUrl);
81
+ this.samlLoad = true;
82
+ }
83
+ },
84
+ toggleModal(data) {
85
+ this.azureLoad = false;
86
+ this.oktaLoad = false;
87
+ this.samlLoad = false;
88
+ this.sso = null;
89
+ this.email = null;
145
90
 
146
- if (data) {
147
- this.sso = data.sso;
148
- this.email = data.email;
149
- }
150
- this.toggle = !this.toggle;
151
- },
152
- },
91
+ if (data) {
92
+ this.sso = data.sso;
93
+ this.email = data.email;
94
+ }
95
+ this.toggle = !this.toggle;
96
+ }
97
+ }
153
98
  };
154
99
  </script>
155
100
 
156
101
  <style scoped>
157
102
  .sso-img {
158
- margin: 0 auto;
159
- margin-top: 2px;
160
- width: 35px;
103
+ margin: 0 auto;
104
+ margin-top: 2px;
105
+ width: 35px;
161
106
  }
162
107
  input {
163
- margin: 0 auto;
164
- height: 25px;
108
+ margin: 0 auto;
109
+ height: 25px;
165
110
  }
166
111
  </style>
@@ -0,0 +1,15 @@
1
+ import pluginVue from 'eslint-plugin-vue';
2
+ export default [
3
+ ...pluginVue.configs['flat/recommended'],
4
+ {
5
+ rules: {
6
+ 'vue/require-valid-default-prop': 'off',
7
+ 'vue/max-attributes-per-line': 'off',
8
+ 'vue/html-indent': 'off',
9
+ 'vue/html-self-closing': 'off',
10
+ 'vue/singleline-html-element-content-newline': 'off'
11
+ // override/add rules settings here, such as:
12
+ // 'vue/no-unused-vars': 'error'
13
+ }
14
+ }
15
+ ];
package/src/install.js CHANGED
@@ -1,17 +1,16 @@
1
- import App from "./App.vue";
1
+ import App from './App.vue';
2
2
  import auth from './store/auth.js';
3
3
 
4
4
  // Export the component by default
5
5
  export default {
6
- install: (app, {store, apiRoot}) => {
7
- // Register the component
8
- app.component('TapniAuth', App);
6
+ install: (app, { store, apiRoot }) => {
7
+ // Register the component
8
+ app.component('TapniAuth', App);
9
9
 
10
- if(!store.hasModule('auth')) {
11
- store.registerModule('auth', auth);
12
- }
10
+ if (!store.hasModule('auth')) {
11
+ store.registerModule('auth', auth);
12
+ }
13
13
 
14
- app.config.globalProperties.$apiRoot = apiRoot;
15
-
16
- }
14
+ app.config.globalProperties.$apiRoot = apiRoot;
15
+ }
17
16
  };
package/src/main.js CHANGED
@@ -1,76 +1,75 @@
1
- import "@tapni/styles/dist/index.css";
2
- import { createApp } from 'vue'
3
- import RootApp from './App.vue'
4
- import router from './router'
5
- import VueCookies from 'vue-cookies'
1
+ import '@tapni/styles/dist/index.css';
2
+ import { createApp } from 'vue';
3
+ import RootApp from './App.vue';
4
+ import router from './router';
5
+ import VueCookies from 'vue-cookies';
6
6
  import { App } from '@capacitor/app';
7
7
  import { Browser } from '@capacitor/browser';
8
8
  import store from './store/store.js';
9
9
  import { sync } from 'vuex-router-sync';
10
10
 
11
- const app = createApp(RootApp)
11
+ const app = createApp(RootApp);
12
12
 
13
- app.config.productionTip = false
13
+ app.config.productionTip = false;
14
14
 
15
15
  // Vuex Router Sync
16
16
  sync(store, router);
17
17
 
18
18
  // Cookies
19
- app.use(VueCookies)
19
+ app.use(VueCookies);
20
20
 
21
- app.use(router)
21
+ app.use(router);
22
22
 
23
- app.use(store)
24
-
25
- app.mount('#app')
23
+ app.use(store);
26
24
 
25
+ app.mount('#app');
27
26
 
28
27
  function hasQueryParams(route) {
29
- return !!Object.keys(route.query).length
28
+ return !!Object.keys(route.query).length;
30
29
  }
31
30
 
32
31
  router.beforeEach((to, from, next) => {
33
- setTimeout(() => {
34
- window.scrollTo(0, 0)
35
- }, 100)
36
-
37
- if(!hasQueryParams(to) && hasQueryParams(from)){
38
- next({name: to.name, query: from.query});
39
- } else {
40
- next()
41
- }
42
- })
32
+ setTimeout(() => {
33
+ window.scrollTo(0, 0);
34
+ }, 100);
35
+
36
+ if (!hasQueryParams(to) && hasQueryParams(from)) {
37
+ next({ name: to.name, query: from.query });
38
+ } else {
39
+ next();
40
+ }
41
+ });
43
42
 
44
43
  /**
45
44
  * Redirect users to desired profile - DEEP LINKING
46
45
  * @param data
47
46
  */
48
47
  function redirectToProfile(data) {
49
- if (data && data.url) {
50
- let url = new URL(data.url)
51
- let pathname = url.pathname || '';
52
- let queryParams = url.search || ''
53
- if(queryParams) queryParams = Object.fromEntries(new URLSearchParams(queryParams));
54
- else queryParams = {};
55
- let subdomain = '';
56
- //['my', 'tapni', 'co']
57
- let tempArr = url.hostname.split('.');
58
- if(tempArr.length === 3) subdomain = tempArr[0];
59
- if(subdomain) queryParams.s = subdomain;
60
-
61
- // open t.link shorter links in browser
62
- if(pathname && /[A-Z]/.test(pathname) && !pathname.startsWith('/t/')) {
63
- Browser.open({url: url.toString()});
64
- return router.push('/');
65
- }
66
-
67
- if (pathname) {
68
- router.push({
69
- path: pathname,
70
- query: queryParams
71
- })
72
- }
73
- }
48
+ if (data && data.url) {
49
+ let url = new URL(data.url);
50
+ let pathname = url.pathname || '';
51
+ let queryParams = url.search || '';
52
+ if (queryParams) queryParams = Object.fromEntries(new URLSearchParams(queryParams));
53
+ else queryParams = {};
54
+ let subdomain = '';
55
+ //['my', 'tapni', 'co']
56
+ let tempArr = url.hostname.split('.');
57
+ if (tempArr.length === 3) subdomain = tempArr[0];
58
+ if (subdomain) queryParams.s = subdomain;
59
+
60
+ // open t.link shorter links in browser
61
+ if (pathname && /[A-Z]/.test(pathname) && !pathname.startsWith('/t/')) {
62
+ Browser.open({ url: url.toString() });
63
+ return router.push('/');
64
+ }
65
+
66
+ if (pathname) {
67
+ router.push({
68
+ path: pathname,
69
+ query: queryParams
70
+ });
71
+ }
72
+ }
74
73
  }
75
74
  /**
76
75
  * CAPACITOR_CONFIG
@@ -78,13 +77,12 @@ function redirectToProfile(data) {
78
77
  * Users who have an app should get the profiles opened in the app ie: tapni.co/tapni
79
78
  */
80
79
  App.addListener('appUrlOpen', async function (data) {
81
- if(data.url && data.url.startsWith('tapni://')) data.url = data.url.replace('tapni://', 'https://')
82
- let url = new URL(data.url);
83
- if(url.pathname.includes('/callback/')) {
84
- await router.push({path: url.pathname, query: Object.fromEntries(new URLSearchParams(url.search))});
85
- }
86
- else redirectToProfile(data);
87
- })
80
+ if (data.url && data.url.startsWith('tapni://')) data.url = data.url.replace('tapni://', 'https://');
81
+ let url = new URL(data.url);
82
+ if (url.pathname.includes('/callback/')) {
83
+ await router.push({ path: url.pathname, query: Object.fromEntries(new URLSearchParams(url.search)) });
84
+ } else redirectToProfile(data);
85
+ });
88
86
 
89
87
  // When the app is open and you trigger NFC event to open the app
90
88
  // App.addListener('appStateChange', async function (l) {
@@ -93,8 +91,7 @@ App.addListener('appUrlOpen', async function (data) {
93
91
 
94
92
  // When the app is closed and NFC event opens the app
95
93
  App.getLaunchUrl().then((data) => {
96
- redirectToProfile(data)
94
+ redirectToProfile(data);
97
95
  });
98
96
 
99
-
100
97
  export { app };
@@ -1,59 +1,61 @@
1
- import to from 'await-to-js'
2
- import AuthService from '../services/AuthService'
3
- import {SignInWithApple} from '@capacitor-community/apple-sign-in';
1
+ import to from 'await-to-js';
2
+ import AuthService from '../services/AuthService';
3
+ import { SignInWithApple } from '@capacitor-community/apple-sign-in';
4
4
 
5
- import { jwtDecode } from "jwt-decode";
6
- import {EventBus} from '../store/event-bus';
5
+ import { jwtDecode } from 'jwt-decode';
6
+ import { EventBus } from '../store/event-bus';
7
7
  export default {
8
- data () {
9
- return {
10
- appleLoad: false
11
- }
12
- },
13
- computed: {
14
- displayAppleLogin () {
15
- return ((Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'ios') || (!Capacitor.isNativePlatform() && this.isiOS));
16
- }
17
- },
18
- methods: {
19
- async appleLogin () {
20
- this.appleLoad = true
21
- const [errAuth, user] = await to(SignInWithApple.authorize({
22
- clientId: 'co.tapni.applelogin',
23
- redirectURI: 'https://' + window.location.host + '/login',
24
- scopes: 'email name'
25
- }))
26
- if (errAuth) return this.appleLoad = false
27
- user.response.tokenData = jwtDecode(user.response.identityToken);
8
+ data() {
9
+ return {
10
+ appleLoad: false
11
+ };
12
+ },
13
+ computed: {
14
+ displayAppleLogin() {
15
+ return (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'ios') || (!Capacitor.isNativePlatform() && this.isiOS);
16
+ }
17
+ },
18
+ methods: {
19
+ async appleLogin() {
20
+ this.appleLoad = true;
21
+ const [errAuth, user] = await to(
22
+ SignInWithApple.authorize({
23
+ clientId: 'co.tapni.applelogin',
24
+ redirectURI: 'https://' + window.location.host + '/login',
25
+ scopes: 'email name'
26
+ })
27
+ );
28
+ if (errAuth) return (this.appleLoad = false);
29
+ user.response.tokenData = jwtDecode(user.response.identityToken);
28
30
 
29
- if (user && user.response && user.response.identityToken) {
30
- // Track Referrals
31
- if (this.referral) user.response.ref = this.referral;
31
+ if (user && user.response && user.response.identityToken) {
32
+ // Track Referrals
33
+ if (this.referral) user.response.ref = this.referral;
32
34
 
33
- // Code Login
34
- if (this.display === 'popup') user.response_type = 'code';
35
+ // Code Login
36
+ if (this.display === 'popup') user.response_type = 'code';
35
37
 
36
- const [err, response] = await to(AuthService.appleSDK(user.response, this.$storex))
37
- if (err) {
38
- this.appleLoad = false
39
- EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
40
- return this.errorHandler(err)
41
- }
42
- if (response.data.success) {
43
- if (this.display === 'popup') {
44
- return window.parent?.postMessage({ code: response.data.auth_code, state: this.$route.query.state }, '*');
45
- }
46
- await this.loginSetup(response)
47
- await this.getLoggedInAccounts()
48
- this.loginSuccess({ ...response, isModal: this.isModal });
49
- setTimeout(() => {
50
- this.appleLoad = false
51
- }, 1000)
52
- } else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err)
53
- } else {
54
- this.appleLoad = false
55
- EventBus.$emit('ssoEvent', {name: 'setLoading', data: false})
56
- }
57
- }
58
- }
59
- }
38
+ const [err, response] = await to(AuthService.appleSDK(user.response, this.$storex));
39
+ if (err) {
40
+ this.appleLoad = false;
41
+ EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
42
+ return this.errorHandler(err);
43
+ }
44
+ if (response.data.success) {
45
+ if (this.display === 'popup') {
46
+ return window.parent?.postMessage({ code: response.data.auth_code, state: this.$route.query.state }, '*');
47
+ }
48
+ await this.loginSetup(response);
49
+ await this.getLoggedInAccounts();
50
+ this.loginSuccess({ ...response, isModal: this.isModal });
51
+ setTimeout(() => {
52
+ this.appleLoad = false;
53
+ }, 1000);
54
+ } else this.errorSnack(this.ssoLang[this.appLanguage].unexpected_err);
55
+ } else {
56
+ this.appleLoad = false;
57
+ EventBus.$emit('ssoEvent', { name: 'setLoading', data: false });
58
+ }
59
+ }
60
+ }
61
+ };
@@ -1,6 +1,6 @@
1
1
  import { createNamespacedHelpers } from 'vuex';
2
2
  const { mapState, mapActions, mapGetters } = createNamespacedHelpers('auth');
3
- import GlobalMixin from './global.mixin'
3
+ import GlobalMixin from './global.mixin';
4
4
 
5
5
  export default {
6
6
  mixins: [GlobalMixin],
@@ -64,6 +64,7 @@ export default {
64
64
  'setRedirectUri',
65
65
  'setDisplay',
66
66
  'setState',
67
+ 'setRealm',
67
68
  'setResponseType',
68
69
  'switchAccount',
69
70
  'loginSetup',
@@ -78,7 +79,7 @@ export default {
78
79
  if (this.$route.query.display) this.setDisplay(this.$route.query.display);
79
80
  if (this.$route.query.state) this.setState(this.$route.query.state)
80
81
  if (this.$route.query.response_type) this.setResponseType(this.$route.query.response_type);
81
- if (this.$route.query.realm && this.$storage) this.setRealm(this.$route.query.realm);
82
+ if (this.$route.query.realm) this.setRealm(this.$route.query.realm);
82
83
  },
83
84
  deep: true,
84
85
  },
@@ -30,10 +30,10 @@ export default {
30
30
  },
31
31
  methods: {
32
32
  getIcon(icon) {
33
- if (!this.isNative && false) {
33
+ if (!this.isNative) {
34
34
  return 'https://cdn.tapni.co/icons/' + icon;
35
35
  } else {
36
- return `http://localhost:7777/icons/${icon}`;
36
+ return `/icons/${icon}`;
37
37
  }
38
38
  },
39
39
  errorHandler(error) {