@tapni/auth 1.0.30 → 1.0.31

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.
@@ -1390,7 +1390,7 @@ function aa(n, e, t, r, o, i) {
1390
1390
  const ro = /* @__PURE__ */ pn(Zi, [["render", aa], ["__scopeId", "data-v-cb61958b"]]), sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1391
1391
  __proto__: null,
1392
1392
  default: ro
1393
- }, Symbol.toStringTag, { value: "Module" })), ca = "1.0.30", ar = {
1393
+ }, Symbol.toStringTag, { value: "Module" })), ca = "1.0.31", ar = {
1394
1394
  getMe() {
1395
1395
  return le().get("/users/me");
1396
1396
  },
@@ -5824,7 +5824,7 @@ Tanıştığınız herkesi etkileyin 😎 <br> Kendinize bir tane ayırın 👇`
5824
5824
  app_region: "지역",
5825
5825
  app_region_p: "맞춤형 결제 및 지원을 위해 지역을 선택하세요"
5826
5826
  }
5827
- }, ko = () => Promise.resolve().then(() => sa), ua = () => Promise.resolve().then(() => uc), da = () => Promise.resolve().then(() => rl), pa = () => Promise.resolve().then(() => Qu), ha = () => Promise.resolve().then(() => Pc), fa = () => Promise.resolve().then(() => vl), ma = () => Promise.resolve().then(() => Zu), ga = () => import("./QR-DuCeHgmQ.js"), _a = () => Promise.resolve().then(() => vu), va = () => import("./Apps-Cu-kTQ3Y.js"), ya = () => import("./Billing-s4vl0lXd.js"), wa = () => import("./CustomApp-D0K9L-Xn.js"), ba = () => import("./General-DoQ2TE3y.js"), ka = [
5827
+ }, ko = () => Promise.resolve().then(() => sa), ua = () => Promise.resolve().then(() => uc), da = () => Promise.resolve().then(() => rl), pa = () => Promise.resolve().then(() => Qu), ha = () => Promise.resolve().then(() => Pc), fa = () => Promise.resolve().then(() => vl), ma = () => Promise.resolve().then(() => Zu), ga = () => import("./QR-hOamVvk4.js"), _a = () => Promise.resolve().then(() => vu), va = () => import("./Apps-DyqTyifK.js"), ya = () => import("./Billing-lPnJ1Xhe.js"), wa = () => import("./CustomApp-Bqp5EHVn.js"), ba = () => import("./General-BPsKKx1X.js"), ka = [
5828
5828
  {
5829
5829
  path: "/welcome",
5830
5830
  name: "AuthWelcome",
@@ -15479,7 +15479,7 @@ const Ps = Er("MsAuthPlugin", {
15479
15479
  }
15480
15480
  },
15481
15481
  async samlLogin(n) {
15482
- this.code_verifier = $n.generateRandomString(28), localStorage.setItem("pkce_code_verifier", this.code_verifier), this.code_challenge = await $n.pkceChallengeFromVerifier(this.code_verifier);
15482
+ console.log("SAMLLL2", n), this.code_verifier = $n.generateRandomString(28), localStorage.setItem("pkce_code_verifier", this.code_verifier), this.code_challenge = await $n.pkceChallengeFromVerifier(this.code_verifier);
15483
15483
  const e = Hn.getPlatform();
15484
15484
  let t = `code_challenge=${this.code_challenge}&platform=${e}&redirect_uri=${location.origin + "/app/callback/saml"}&realm=${this.realm}&display=${this.display}`, r = btoa(t);
15485
15485
  n = `${n}&RelayState=${r}`;
@@ -15497,7 +15497,7 @@ const Ps = Er("MsAuthPlugin", {
15497
15497
  }
15498
15498
  },
15499
15499
  { once: !0 }
15500
- ), this.isNative ? this.popupWindow = await dr.open({ url: n, presentationStyle: "popover" }) : (this.checkInterval = setInterval(() => {
15500
+ ), this.isNative ? (console.log("SAMLLL3"), this.popupWindow = await dr.open({ url: n, presentationStyle: "popover" }), console.log("SAMLLL4")) : (this.checkInterval = setInterval(() => {
15501
15501
  var s;
15502
15502
  const i = localStorage.getItem("auth_code"), a = localStorage.getItem("pkce_code_verifier");
15503
15503
  i && (clearInterval(this.checkInterval), localStorage.removeItem("auth_code"), localStorage.removeItem("pkce_code_verifier"), (s = window.parent) == null || s.postMessage({ code: i, state: this.$route.query.state, code_verifier: a }, "*"), a && (this.display === "npm" || this.display === "redirect") && this.exchangeAuthCode({ code: i, code_verifier: a }));
@@ -15646,7 +15646,7 @@ const Ps = Er("MsAuthPlugin", {
15646
15646
  async ssoLoginSubmit() {
15647
15647
  this.loading = !0;
15648
15648
  const n = await this.getCompanyBySSOEmail({ email: this.emailOrUsername });
15649
- this.loading = !1;
15649
+ console.log("SAMLLL1", JSON.stringify(n)), this.loading = !1;
15650
15650
  let e;
15651
15651
  if (!(!n || n.error))
15652
15652
  if (e = Object.keys(n.sso), e.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapni/auth",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
@@ -30,6 +30,8 @@ export default {
30
30
  }
31
31
  },
32
32
  async samlLogin(loginUrl) {
33
+ console.log('SAMLLL2', loginUrl);
34
+
33
35
  // Create and store a new PKCE code_verifier (the plaintext random secret)
34
36
  this.code_verifier = UtilService.generateRandomString(28);
35
37
  localStorage.setItem("pkce_code_verifier", this.code_verifier);
@@ -67,7 +69,11 @@ export default {
67
69
  );
68
70
 
69
71
  if (this.isNative) {
72
+ console.log('SAMLLL3');
73
+
70
74
  this.popupWindow = await Browser.open({ url: loginUrl, presentationStyle: 'popover' });
75
+ console.log('SAMLLL4');
76
+
71
77
  } else {
72
78
  this.checkInterval = setInterval(() => {
73
79
  // check localStorage
@@ -355,6 +355,7 @@ export default {
355
355
  async ssoLoginSubmit () {
356
356
  this.loading = true;
357
357
  const response = await this.getCompanyBySSOEmail({ email: this.emailOrUsername });
358
+ console.log('SAMLLL1', JSON.stringify(response));
358
359
  this.loading = false;
359
360
  let ssoTypes;
360
361
  if (!response || response.error) return;