@tapni/auth 0.0.141 → 0.0.142

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.
@@ -9,16 +9,131 @@ import { Device as vr } from "@capacitor/device";
9
9
  import { Browser as yr } from "@capacitor/browser";
10
10
  import $o from "qr-code-styling";
11
11
  import { sanitizeUrl as Vi } from "@braintree/sanitize-url";
12
+ function Qi(n) {
13
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
14
+ }
15
+ var Jo = { exports: {} }, Me = Jo.exports = {}, Ht, jt;
16
+ function Yr() {
17
+ throw new Error("setTimeout has not been defined");
18
+ }
19
+ function Wr() {
20
+ throw new Error("clearTimeout has not been defined");
21
+ }
22
+ (function() {
23
+ try {
24
+ typeof setTimeout == "function" ? Ht = setTimeout : Ht = Yr;
25
+ } catch {
26
+ Ht = Yr;
27
+ }
28
+ try {
29
+ typeof clearTimeout == "function" ? jt = clearTimeout : jt = Wr;
30
+ } catch {
31
+ jt = Wr;
32
+ }
33
+ })();
34
+ function Xo(n) {
35
+ if (Ht === setTimeout)
36
+ return setTimeout(n, 0);
37
+ if ((Ht === Yr || !Ht) && setTimeout)
38
+ return Ht = setTimeout, setTimeout(n, 0);
39
+ try {
40
+ return Ht(n, 0);
41
+ } catch {
42
+ try {
43
+ return Ht.call(null, n, 0);
44
+ } catch {
45
+ return Ht.call(this, n, 0);
46
+ }
47
+ }
48
+ }
49
+ function Yi(n) {
50
+ if (jt === clearTimeout)
51
+ return clearTimeout(n);
52
+ if ((jt === Wr || !jt) && clearTimeout)
53
+ return jt = clearTimeout, clearTimeout(n);
54
+ try {
55
+ return jt(n);
56
+ } catch {
57
+ try {
58
+ return jt.call(null, n);
59
+ } catch {
60
+ return jt.call(this, n);
61
+ }
62
+ }
63
+ }
64
+ var Xt = [], Dn = !1, kn, mr = -1;
65
+ function Wi() {
66
+ !Dn || !kn || (Dn = !1, kn.length ? Xt = kn.concat(Xt) : mr = -1, Xt.length && Zo());
67
+ }
68
+ function Zo() {
69
+ if (!Dn) {
70
+ var n = Xo(Wi);
71
+ Dn = !0;
72
+ for (var e = Xt.length; e; ) {
73
+ for (kn = Xt, Xt = []; ++mr < e; )
74
+ kn && kn[mr].run();
75
+ mr = -1, e = Xt.length;
76
+ }
77
+ kn = null, Dn = !1, Yi(n);
78
+ }
79
+ }
80
+ Me.nextTick = function(n) {
81
+ var e = new Array(arguments.length - 1);
82
+ if (arguments.length > 1)
83
+ for (var t = 1; t < arguments.length; t++)
84
+ e[t - 1] = arguments[t];
85
+ Xt.push(new ei(n, e)), Xt.length === 1 && !Dn && Xo(Zo);
86
+ };
87
+ function ei(n, e) {
88
+ this.fun = n, this.array = e;
89
+ }
90
+ ei.prototype.run = function() {
91
+ this.fun.apply(null, this.array);
92
+ };
93
+ Me.title = "browser";
94
+ Me.browser = !0;
95
+ Me.env = {};
96
+ Me.argv = [];
97
+ Me.version = "";
98
+ Me.versions = {};
99
+ function rn() {
100
+ }
101
+ Me.on = rn;
102
+ Me.addListener = rn;
103
+ Me.once = rn;
104
+ Me.off = rn;
105
+ Me.removeListener = rn;
106
+ Me.removeAllListeners = rn;
107
+ Me.emit = rn;
108
+ Me.prependListener = rn;
109
+ Me.prependOnceListener = rn;
110
+ Me.listeners = function(n) {
111
+ return [];
112
+ };
113
+ Me.binding = function(n) {
114
+ throw new Error("process.binding is not supported");
115
+ };
116
+ Me.cwd = function() {
117
+ return "/";
118
+ };
119
+ Me.chdir = function(n) {
120
+ throw new Error("process.chdir is not supported");
121
+ };
122
+ Me.umask = function() {
123
+ return 0;
124
+ };
125
+ var $i = Jo.exports;
126
+ const Ji = /* @__PURE__ */ Qi($i);
12
127
  var lo = {}, Nr = {};
13
- Nr.byteLength = Wi;
14
- Nr.toByteArray = Ji;
15
- Nr.fromByteArray = ea;
16
- var qt = [], bt = [], Qi = typeof Uint8Array < "u" ? Uint8Array : Array, Kr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
17
- for (var Mn = 0, Yi = Kr.length; Mn < Yi; ++Mn)
128
+ Nr.byteLength = ea;
129
+ Nr.toByteArray = na;
130
+ Nr.fromByteArray = ia;
131
+ var qt = [], bt = [], Xi = typeof Uint8Array < "u" ? Uint8Array : Array, Kr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
132
+ for (var Mn = 0, Zi = Kr.length; Mn < Zi; ++Mn)
18
133
  qt[Mn] = Kr[Mn], bt[Kr.charCodeAt(Mn)] = Mn;
19
134
  bt[45] = 62;
20
135
  bt[95] = 63;
21
- function Jo(n) {
136
+ function ti(n) {
22
137
  var e = n.length;
23
138
  if (e % 4 > 0)
24
139
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -27,30 +142,30 @@ function Jo(n) {
27
142
  var r = t === e ? 0 : 4 - t % 4;
28
143
  return [t, r];
29
144
  }
30
- function Wi(n) {
31
- var e = Jo(n), t = e[0], r = e[1];
145
+ function ea(n) {
146
+ var e = ti(n), t = e[0], r = e[1];
32
147
  return (t + r) * 3 / 4 - r;
33
148
  }
34
- function $i(n, e, t) {
149
+ function ta(n, e, t) {
35
150
  return (e + t) * 3 / 4 - t;
36
151
  }
37
- function Ji(n) {
38
- var e, t = Jo(n), r = t[0], o = t[1], i = new Qi($i(n, r, o)), a = 0, s = o > 0 ? r - 4 : r, u;
152
+ function na(n) {
153
+ var e, t = ti(n), r = t[0], o = t[1], i = new Xi(ta(n, r, o)), a = 0, s = o > 0 ? r - 4 : r, u;
39
154
  for (u = 0; u < s; u += 4)
40
155
  e = bt[n.charCodeAt(u)] << 18 | bt[n.charCodeAt(u + 1)] << 12 | bt[n.charCodeAt(u + 2)] << 6 | bt[n.charCodeAt(u + 3)], i[a++] = e >> 16 & 255, i[a++] = e >> 8 & 255, i[a++] = e & 255;
41
156
  return o === 2 && (e = bt[n.charCodeAt(u)] << 2 | bt[n.charCodeAt(u + 1)] >> 4, i[a++] = e & 255), o === 1 && (e = bt[n.charCodeAt(u)] << 10 | bt[n.charCodeAt(u + 1)] << 4 | bt[n.charCodeAt(u + 2)] >> 2, i[a++] = e >> 8 & 255, i[a++] = e & 255), i;
42
157
  }
43
- function Xi(n) {
158
+ function ra(n) {
44
159
  return qt[n >> 18 & 63] + qt[n >> 12 & 63] + qt[n >> 6 & 63] + qt[n & 63];
45
160
  }
46
- function Zi(n, e, t) {
161
+ function oa(n, e, t) {
47
162
  for (var r, o = [], i = e; i < t; i += 3)
48
- r = (n[i] << 16 & 16711680) + (n[i + 1] << 8 & 65280) + (n[i + 2] & 255), o.push(Xi(r));
163
+ r = (n[i] << 16 & 16711680) + (n[i + 1] << 8 & 65280) + (n[i + 2] & 255), o.push(ra(r));
49
164
  return o.join("");
50
165
  }
51
- function ea(n) {
166
+ function ia(n) {
52
167
  for (var e, t = n.length, r = t % 3, o = [], i = 16383, a = 0, s = t - r; a < s; a += i)
53
- o.push(Zi(n, a, a + i > s ? s : a + i));
168
+ o.push(oa(n, a, a + i > s ? s : a + i));
54
169
  return r === 1 ? (e = n[t - 1], o.push(
55
170
  qt[e >> 2] + qt[e << 4 & 63] + "=="
56
171
  )) : r === 2 && (e = (n[t - 2] << 8) + n[t - 1], o.push(
@@ -1060,7 +1175,7 @@ uo.write = function(n, e, t, r, o, i) {
1060
1175
  throw new Error("BigInt not supported");
1061
1176
  }
1062
1177
  })(lo);
1063
- const wn = lo.Buffer, ta = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()), q = {
1178
+ const wn = lo.Buffer, aa = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()), q = {
1064
1179
  $on(n, e) {
1065
1180
  let t = pr.get(n);
1066
1181
  t || (t = /* @__PURE__ */ new Set(), pr.set(n, t)), t.add(e);
@@ -1077,7 +1192,7 @@ const wn = lo.Buffer, ta = lo.Buffer, pr = Qr(/* @__PURE__ */ new Map()), q = {
1077
1192
  }
1078
1193
  };
1079
1194
  zi(q);
1080
- const na = {
1195
+ const sa = {
1081
1196
  computed: {
1082
1197
  home() {
1083
1198
  return this.$storex && this.$storex.token && this.$storex.username ? "/" + this.$storex.username : "/welcome";
@@ -1143,10 +1258,10 @@ const na = {
1143
1258
  }
1144
1259
  }
1145
1260
  }
1146
- }, { mapState: ra, mapActions: oa, mapGetters: ia } = qi("auth"), at = {
1147
- mixins: [na],
1261
+ }, { mapState: ca, mapActions: la, mapGetters: ua } = qi("auth"), at = {
1262
+ mixins: [sa],
1148
1263
  computed: {
1149
- ...ra([
1264
+ ...ca([
1150
1265
  "$storex",
1151
1266
  "refreshing",
1152
1267
  "loggedInUserId",
@@ -1160,14 +1275,14 @@ const na = {
1160
1275
  "state",
1161
1276
  "allowedOriginsAuth"
1162
1277
  ]),
1163
- ...ia([
1278
+ ...ua([
1164
1279
  "isLoggedIn",
1165
1280
  "renderView",
1166
1281
  "appLanguage"
1167
1282
  ])
1168
1283
  },
1169
1284
  methods: {
1170
- ...oa([
1285
+ ...la([
1171
1286
  "setLoggedInAccounts",
1172
1287
  "setLoggedInUserId",
1173
1288
  "getRefreshTokens",
@@ -1213,7 +1328,7 @@ const na = {
1213
1328
  for (const [r, o] of e)
1214
1329
  t[r] = o;
1215
1330
  return t;
1216
- }, aa = {
1331
+ }, da = {
1217
1332
  name: "AuthWelcome",
1218
1333
  mixins: [at],
1219
1334
  data() {
@@ -1235,23 +1350,23 @@ const na = {
1235
1350
  }, 500);
1236
1351
  },
1237
1352
  methods: {}
1238
- }, Xo = (n) => (An("data-v-615ed484"), n = n(), Rn(), n), sa = {
1353
+ }, ni = (n) => (An("data-v-615ed484"), n = n(), Rn(), n), pa = {
1239
1354
  class: "page-login content-boxed content-boxed-padding center-text",
1240
1355
  style: { "margin-top": "-1px", overflow: "hidden", border: "solid 0px #ffffff" }
1241
- }, ca = ["autoplay"], la = /* @__PURE__ */ Xo(() => /* @__PURE__ */ _("source", {
1356
+ }, ha = ["autoplay"], fa = /* @__PURE__ */ ni(() => /* @__PURE__ */ _("source", {
1242
1357
  src: "https://cdn.tapni.co/images/tapni-card-tap-video-white.mp4",
1243
1358
  type: "video/mp4"
1244
- }, null, -1)), ua = [
1245
- la
1246
- ], da = { class: "bold full-top no-bottom center-text" }, pa = { class: "full-bottom half-top center-text color-black font-16" }, ha = { class: "page-login-links center-text" }, fa = /* @__PURE__ */ Xo(() => /* @__PURE__ */ _("div", { class: "clear" }, null, -1)), ga = {
1359
+ }, null, -1)), ga = [
1360
+ fa
1361
+ ], ma = { class: "bold full-top no-bottom center-text" }, _a = { class: "full-bottom half-top center-text color-black font-16" }, va = { class: "page-login-links center-text" }, ya = /* @__PURE__ */ ni(() => /* @__PURE__ */ _("div", { class: "clear" }, null, -1)), wa = {
1247
1362
  key: 2,
1248
1363
  style: { display: "flex", "flex-direction": "row", "justify-content": "space-around", width: "90%", margin: "0 auto", "margin-top": "40px" }
1249
- }, ma = /* @__PURE__ */ xi('<a href="https://play.google.com/store/apps/details?id=co.tapni.app" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/playstore.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a><a href="https://apps.apple.com/ag/app/tapni/id1552930233" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/appstore.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a><a href="https://appgallery.huawei.com/#/app/C103931997" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/appgallery.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a>', 3), _a = [
1250
- ma
1364
+ }, ba = /* @__PURE__ */ xi('<a href="https://play.google.com/store/apps/details?id=co.tapni.app" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/playstore.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a><a href="https://apps.apple.com/ag/app/tapni/id1552930233" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/appstore.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a><a href="https://appgallery.huawei.com/#/app/C103931997" target="_blank" data-v-615ed484><img src="https://cdn.tapni.co/images/appgallery.png" class="app-store-icon pointer" style="width:55px;" data-v-615ed484></a>', 3), ka = [
1365
+ ba
1251
1366
  ];
1252
- function va(n, e, t, r, o, i) {
1367
+ function Ca(n, e, t, r, o, i) {
1253
1368
  const a = Kn("router-link");
1254
- return N(), U("div", sa, [
1369
+ return N(), U("div", pa, [
1255
1370
  _("video", {
1256
1371
  id: "tapniVideo",
1257
1372
  muted: "",
@@ -1260,9 +1375,9 @@ function va(n, e, t, r, o, i) {
1260
1375
  width: "350",
1261
1376
  style: { margin: "0 auto", "max-width": "100%", "margin-top": "63px", overflow: "hidden" },
1262
1377
  autoplay: n.isNative
1263
- }, ua, 8, ca),
1264
- _("h1", da, Q(n.ssoLang[this.appLanguage].welcome), 1),
1265
- _("p", pa, Q(n.ssoLang[this.appLanguage].welcome_p1), 1),
1378
+ }, ga, 8, ha),
1379
+ _("h1", ma, Q(n.ssoLang[this.appLanguage].welcome), 1),
1380
+ _("p", _a, Q(n.ssoLang[this.appLanguage].welcome_p1), 1),
1266
1381
  fe("", !0),
1267
1382
  fe("", !0),
1268
1383
  De(a, {
@@ -1275,7 +1390,7 @@ function va(n, e, t, r, o, i) {
1275
1390
  ]),
1276
1391
  _: 1
1277
1392
  }),
1278
- _("div", ha, [
1393
+ _("div", va, [
1279
1394
  De(a, { to: "/login" }, {
1280
1395
  default: Gt(() => [
1281
1396
  ke(Q(n.ssoLang[this.appLanguage].already_registered) + "? ", 1),
@@ -1283,130 +1398,15 @@ function va(n, e, t, r, o, i) {
1283
1398
  ]),
1284
1399
  _: 1
1285
1400
  }),
1286
- fa
1401
+ ya
1287
1402
  ]),
1288
- this.isNative ? fe("", !0) : (N(), U("div", ga, _a))
1403
+ this.isNative ? fe("", !0) : (N(), U("div", wa, ka))
1289
1404
  ]);
1290
1405
  }
1291
- const po = /* @__PURE__ */ mt(aa, [["render", va], ["__scopeId", "data-v-615ed484"]]), ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1406
+ const po = /* @__PURE__ */ mt(da, [["render", Ca], ["__scopeId", "data-v-615ed484"]]), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1292
1407
  __proto__: null,
1293
1408
  default: po
1294
- }, Symbol.toStringTag, { value: "Module" })), wa = "0.0.141";
1295
- function ba(n) {
1296
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
1297
- }
1298
- var Zo = { exports: {} }, Me = Zo.exports = {}, Ht, jt;
1299
- function Yr() {
1300
- throw new Error("setTimeout has not been defined");
1301
- }
1302
- function Wr() {
1303
- throw new Error("clearTimeout has not been defined");
1304
- }
1305
- (function() {
1306
- try {
1307
- typeof setTimeout == "function" ? Ht = setTimeout : Ht = Yr;
1308
- } catch {
1309
- Ht = Yr;
1310
- }
1311
- try {
1312
- typeof clearTimeout == "function" ? jt = clearTimeout : jt = Wr;
1313
- } catch {
1314
- jt = Wr;
1315
- }
1316
- })();
1317
- function ei(n) {
1318
- if (Ht === setTimeout)
1319
- return setTimeout(n, 0);
1320
- if ((Ht === Yr || !Ht) && setTimeout)
1321
- return Ht = setTimeout, setTimeout(n, 0);
1322
- try {
1323
- return Ht(n, 0);
1324
- } catch {
1325
- try {
1326
- return Ht.call(null, n, 0);
1327
- } catch {
1328
- return Ht.call(this, n, 0);
1329
- }
1330
- }
1331
- }
1332
- function ka(n) {
1333
- if (jt === clearTimeout)
1334
- return clearTimeout(n);
1335
- if ((jt === Wr || !jt) && clearTimeout)
1336
- return jt = clearTimeout, clearTimeout(n);
1337
- try {
1338
- return jt(n);
1339
- } catch {
1340
- try {
1341
- return jt.call(null, n);
1342
- } catch {
1343
- return jt.call(this, n);
1344
- }
1345
- }
1346
- }
1347
- var Xt = [], Dn = !1, kn, mr = -1;
1348
- function Ca() {
1349
- !Dn || !kn || (Dn = !1, kn.length ? Xt = kn.concat(Xt) : mr = -1, Xt.length && ti());
1350
- }
1351
- function ti() {
1352
- if (!Dn) {
1353
- var n = ei(Ca);
1354
- Dn = !0;
1355
- for (var e = Xt.length; e; ) {
1356
- for (kn = Xt, Xt = []; ++mr < e; )
1357
- kn && kn[mr].run();
1358
- mr = -1, e = Xt.length;
1359
- }
1360
- kn = null, Dn = !1, ka(n);
1361
- }
1362
- }
1363
- Me.nextTick = function(n) {
1364
- var e = new Array(arguments.length - 1);
1365
- if (arguments.length > 1)
1366
- for (var t = 1; t < arguments.length; t++)
1367
- e[t - 1] = arguments[t];
1368
- Xt.push(new ni(n, e)), Xt.length === 1 && !Dn && ei(ti);
1369
- };
1370
- function ni(n, e) {
1371
- this.fun = n, this.array = e;
1372
- }
1373
- ni.prototype.run = function() {
1374
- this.fun.apply(null, this.array);
1375
- };
1376
- Me.title = "browser";
1377
- Me.browser = !0;
1378
- Me.env = {};
1379
- Me.argv = [];
1380
- Me.version = "";
1381
- Me.versions = {};
1382
- function rn() {
1383
- }
1384
- Me.on = rn;
1385
- Me.addListener = rn;
1386
- Me.once = rn;
1387
- Me.off = rn;
1388
- Me.removeListener = rn;
1389
- Me.removeAllListeners = rn;
1390
- Me.emit = rn;
1391
- Me.prependListener = rn;
1392
- Me.prependOnceListener = rn;
1393
- Me.listeners = function(n) {
1394
- return [];
1395
- };
1396
- Me.binding = function(n) {
1397
- throw new Error("process.binding is not supported");
1398
- };
1399
- Me.cwd = function() {
1400
- return "/";
1401
- };
1402
- Me.chdir = function(n) {
1403
- throw new Error("process.chdir is not supported");
1404
- };
1405
- Me.umask = function() {
1406
- return 0;
1407
- };
1408
- var Ea = Zo.exports;
1409
- const Ta = /* @__PURE__ */ ba(Ea), hr = {
1409
+ }, Symbol.toStringTag, { value: "Module" })), Ta = "0.0.142", hr = {
1410
1410
  getMe() {
1411
1411
  return ce().get("/users/me");
1412
1412
  },
@@ -5547,7 +5547,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
5547
5547
  choose_other_login_methods: "다른 로그인 방법 선택하기",
5548
5548
  no_sso_logins: "귀하의 회사는 SSO 로그인을 사용하지 않습니다. 관리자에게 문의하십시오."
5549
5549
  }
5550
- }, Ao = () => Promise.resolve().then(() => ya), Ia = () => Promise.resolve().then(() => Kc), Aa = () => Promise.resolve().then(() => Bl), Ra = () => Promise.resolve().then(() => yd), Pa = () => import("./Account-_4l984Nj.js"), Ma = () => Promise.resolve().then(() => pu), Na = () => Promise.resolve().then(() => Sd), Oa = () => import("./QR-uIUQlRcL.js"), La = () => Promise.resolve().then(() => zu), za = [
5550
+ }, Ao = () => Promise.resolve().then(() => Ea), Ia = () => Promise.resolve().then(() => Kc), Aa = () => Promise.resolve().then(() => Bl), Ra = () => Promise.resolve().then(() => yd), Pa = () => import("./Account-DfOXI9XU.js"), Ma = () => Promise.resolve().then(() => pu), Na = () => Promise.resolve().then(() => Sd), Oa = () => import("./QR--DneK1jw.js"), La = () => Promise.resolve().then(() => zu), za = [
5551
5551
  {
5552
5552
  path: "/welcome",
5553
5553
  name: "AuthWelcome",
@@ -5989,14 +5989,14 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
5989
5989
  appLanguage: (n) => n.lang,
5990
5990
  accessToken: (n) => n.$storex.token,
5991
5991
  refreshTokens: (n) => n.$storex.refreshTokens.split(","),
5992
- apiRoot: (n) => n.apiRoot || Ta.env.VUE_APP_API_ROOT
5992
+ apiRoot: (n) => n.apiRoot
5993
5993
  }
5994
5994
  }, It = Ki({
5995
5995
  modules: {
5996
5996
  auth: ho
5997
5997
  }
5998
5998
  }), ce = (n = null) => {
5999
- const e = wa;
5999
+ const e = Ta;
6000
6000
  let t = "https://api.tapni.co/v1/";
6001
6001
  It.getters["auth/apiRoot"] && (t = It.getters["auth/apiRoot"]);
6002
6002
  let r = co.create({
@@ -18308,7 +18308,7 @@ const Rp = { id: "ssoapp" }, Pp = {
18308
18308
  },
18309
18309
  methods: {
18310
18310
  async init() {
18311
- if (this.setStorage(this.strg), this.isSetup)
18311
+ if (this.$store.commit("auth/setApiRoot", this.$apiRoot || Ji.env.VUE_APP_API_ROOT), this.setStorage(this.strg), this.isSetup)
18312
18312
  return;
18313
18313
  this.isSetup = !0, this.setToken(this.$storex.token);
18314
18314
  const n = this.getRefreshTokens();
@@ -18352,7 +18352,7 @@ const Rp = { id: "ssoapp" }, Pp = {
18352
18352
  }
18353
18353
  }, Kp = /* @__PURE__ */ Object.assign(qp, {
18354
18354
  setup(n) {
18355
- return window.Buffer = ta, document.addEventListener("DOMContentLoaded", function() {
18355
+ return window.Buffer = aa, document.addEventListener("DOMContentLoaded", function() {
18356
18356
  const e = document.createElement("script");
18357
18357
  e.src = `https://www.google.com/recaptcha/api.js?render=${Ap.VITE_GOOGLE_RECAPTCHA_SITE_KEY}`, document.head.appendChild(e);
18358
18358
  }), (e, t) => (N(), U("div", Rp, [
@@ -18403,8 +18403,8 @@ const Rp = { id: "ssoapp" }, Pp = {
18403
18403
  ]));
18404
18404
  }
18405
18405
  }), rh = {
18406
- install: (n, e) => {
18407
- n.component("TapniAuth", Kp), e.hasModule("auth") || e.registerModule("auth", ho);
18406
+ install: (n, { store: e, apiRoot: t }) => {
18407
+ n.component("TapniAuth", Kp), e.hasModule("auth") || e.registerModule("auth", ho), n.config.globalProperties.apiRoot = t;
18408
18408
  }
18409
18409
  };
18410
18410
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapni/auth",
3
- "version": "0.0.141",
3
+ "version": "0.0.142",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
package/src/App.vue CHANGED
@@ -158,6 +158,8 @@ export default {
158
158
  },
159
159
  methods: {
160
160
  async init () {
161
+ this.$store.commit('auth/setApiRoot', this.$apiRoot || process.env.VUE_APP_API_ROOT);
162
+
161
163
  // Set $storage into vuex $storex
162
164
  this.setStorage(this.strg);
163
165
 
package/src/install.js CHANGED
@@ -3,12 +3,15 @@ import auth from './store/auth.js';
3
3
 
4
4
  // Export the component by default
5
5
  export default {
6
- install: (app, rootStore) => {
6
+ install: (app, {store, apiRoot}) => {
7
7
  // Register the component
8
8
  app.component('TapniAuth', App);
9
9
 
10
- if(!rootStore.hasModule('auth')) {
11
- rootStore.registerModule('auth', auth);
10
+ if(!store.hasModule('auth')) {
11
+ store.registerModule('auth', auth);
12
12
  }
13
+
14
+ app.config.globalProperties.apiRoot = apiRoot;
15
+
13
16
  }
14
17
  };
package/src/store/auth.js CHANGED
@@ -560,7 +560,7 @@ export default {
560
560
  return state.$storex.refreshTokens.split(',')
561
561
  },
562
562
  apiRoot: state => {
563
- return state.apiRoot || process.env.VUE_APP_API_ROOT;
563
+ return state.apiRoot;
564
564
  }
565
565
  }
566
566
  };