@stytch/vanilla-js 3.2.5 → 3.3.0
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.
- package/CHANGELOG.md +15 -0
- package/dist/b2b/index.d.ts +103 -5
- package/dist/b2b/index.esm.d.ts +103 -5
- package/dist/b2b/index.esm.js +3033 -2594
- package/dist/b2b/index.headless.d.ts +103 -5
- package/dist/b2b/index.headless.esm.d.ts +103 -5
- package/dist/b2b/index.headless.esm.js +830 -391
- package/dist/b2b/index.headless.js +802 -363
- package/dist/b2b/index.js +3367 -2928
- package/dist/index.esm.js +251 -215
- package/dist/index.headless.esm.js +119 -114
- package/dist/index.headless.js +131 -126
- package/dist/index.js +137 -101
- package/package.json +17 -18
|
@@ -189,9 +189,9 @@ function s() {
|
|
|
189
189
|
return this;
|
|
190
190
|
});
|
|
191
191
|
var S = Object.getPrototypeOf,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
var
|
|
192
|
+
A = S && S(S(I([])));
|
|
193
|
+
A && A !== r && n.call(A, c) && (w = A);
|
|
194
|
+
var C = k.prototype = b.prototype = Object.create(w);
|
|
195
195
|
function T(e) {
|
|
196
196
|
["next", "throw", "return"].forEach(function (t) {
|
|
197
197
|
d(e, t, function (e) {
|
|
@@ -306,7 +306,7 @@ function s() {
|
|
|
306
306
|
}
|
|
307
307
|
throw new TypeError(i(t) + " is not iterable");
|
|
308
308
|
}
|
|
309
|
-
return g.prototype = k, o(
|
|
309
|
+
return g.prototype = k, o(C, "constructor", {
|
|
310
310
|
value: k,
|
|
311
311
|
configurable: !0
|
|
312
312
|
}), o(k, "constructor", {
|
|
@@ -316,7 +316,7 @@ function s() {
|
|
|
316
316
|
var t = "function" == typeof e && e.constructor;
|
|
317
317
|
return !!t && (t === g || "GeneratorFunction" === (t.displayName || t.name));
|
|
318
318
|
}, t.mark = function (e) {
|
|
319
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(e, k) : (e.__proto__ = k, d(e, l, "GeneratorFunction")), e.prototype = Object.create(
|
|
319
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, k) : (e.__proto__ = k, d(e, l, "GeneratorFunction")), e.prototype = Object.create(C), e;
|
|
320
320
|
}, t.awrap = function (e) {
|
|
321
321
|
return {
|
|
322
322
|
__await: e
|
|
@@ -329,9 +329,9 @@ function s() {
|
|
|
329
329
|
return t.isGeneratorFunction(r) ? o : o.next().then(function (e) {
|
|
330
330
|
return e.done ? e.value : o.next();
|
|
331
331
|
});
|
|
332
|
-
}, T(
|
|
332
|
+
}, T(C), d(C, l, "Generator"), d(C, c, function () {
|
|
333
333
|
return this;
|
|
334
|
-
}), d(
|
|
334
|
+
}), d(C, "toString", function () {
|
|
335
335
|
return "[object Generator]";
|
|
336
336
|
}), t.keys = function (e) {
|
|
337
337
|
var t = Object(e),
|
|
@@ -544,8 +544,8 @@ var v,
|
|
|
544
544
|
k,
|
|
545
545
|
w,
|
|
546
546
|
S = "https://accounts.google.com/gsi",
|
|
547
|
-
|
|
548
|
-
function
|
|
547
|
+
A = "".concat(S, "/client");
|
|
548
|
+
function C(e, t) {
|
|
549
549
|
var r = {};
|
|
550
550
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
551
551
|
if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
|
|
@@ -590,7 +590,7 @@ function T(e, t, r, n) {
|
|
|
590
590
|
}(g || (g = {})), function (e) {
|
|
591
591
|
e.SMS = "sms", e.WhatsApp = "whatsapp", e.Email = "email";
|
|
592
592
|
}(k || (k = {})), function (e) {
|
|
593
|
-
e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.PasskeyRegister = "PASSKEY_REGISTER", e.PasskeyAuthenticate = "PASSKEY_AUTHENTICATE", e.PasskeySkip = "PASSKEY_SKIP", e.PasskeyDone = "PASSKEY_DONE", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "
|
|
593
|
+
e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.PasskeyRegister = "PASSKEY_REGISTER", e.PasskeyAuthenticate = "PASSKEY_AUTHENTICATE", e.PasskeySkip = "PASSKEY_SKIP", e.PasskeyDone = "PASSKEY_DONE", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "B2B_OAUTH_AUTHENTICATE", e.B2BOAuthDiscoveryAuthenticate = "B2B_OAUTH_DISCOVERY_AUTHENTICATE", e.B2BDiscoveryOrganizationsCreate = "B2B_DISCOVERY_ORGANIZATIONS_CREATE", e.B2BDiscoveryIntermediateSessionExchange = "B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE", e.B2BPasswordAuthenticate = "B2B_PASSWORD_AUTHENTICATE", e.B2BPasswordResetByEmailStart = "B2B_PASSWORD_RESET_BY_EMAIL_START", e.B2BPasswordResetByEmail = "B2B_PASSWORD_RESET_BY_EMAIL", e.B2BPasswordResetBySession = "B2B_PASSWORD_RESET_BY_SESSION";
|
|
594
594
|
}(w || (w = {}));
|
|
595
595
|
var O,
|
|
596
596
|
E,
|
|
@@ -666,87 +666,88 @@ var j,
|
|
|
666
666
|
return a(r);
|
|
667
667
|
}();
|
|
668
668
|
function M(e) {
|
|
669
|
-
var t
|
|
670
|
-
r = e.
|
|
671
|
-
n = e.
|
|
672
|
-
i = e.
|
|
673
|
-
o = e.
|
|
674
|
-
a = e.
|
|
675
|
-
c = e.
|
|
669
|
+
var t,
|
|
670
|
+
r = e.method,
|
|
671
|
+
n = e.errorMessage,
|
|
672
|
+
i = e.finalURL,
|
|
673
|
+
o = e.basicAuthHeader,
|
|
674
|
+
a = e.xSDKClientHeader,
|
|
675
|
+
c = e.xSDKParentHostHeader,
|
|
676
|
+
u = e.body;
|
|
676
677
|
return T(this, void 0, void 0, s().mark(function e() {
|
|
677
|
-
var
|
|
678
|
+
var l, d, h, p, f, _;
|
|
678
679
|
return s().wrap(function (e) {
|
|
679
680
|
for (;;) switch (e.prev = e.next) {
|
|
680
681
|
case 0:
|
|
681
|
-
return
|
|
682
|
-
Authorization:
|
|
682
|
+
return l = {
|
|
683
|
+
Authorization: o,
|
|
683
684
|
"Content-Type": "application/json",
|
|
684
|
-
"X-SDK-Client":
|
|
685
|
-
},
|
|
686
|
-
method:
|
|
687
|
-
headers:
|
|
688
|
-
body:
|
|
689
|
-
}, e.prev = 3, e.next = 6, fetch(
|
|
685
|
+
"X-SDK-Client": a
|
|
686
|
+
}, c && (l["X-SDK-Parent-Host"] = c), d = {
|
|
687
|
+
method: r,
|
|
688
|
+
headers: l,
|
|
689
|
+
body: u && JSON.stringify(u)
|
|
690
|
+
}, e.prev = 3, e.next = 6, fetch(i, d);
|
|
690
691
|
case 6:
|
|
691
|
-
|
|
692
|
+
h = e.sent, e.next = 14;
|
|
692
693
|
break;
|
|
693
694
|
case 9:
|
|
694
695
|
if (e.prev = 9, e.t0 = e["catch"](3), "Failed to fetch" !== e.t0.message) {
|
|
695
696
|
e.next = 13;
|
|
696
697
|
break;
|
|
697
698
|
}
|
|
698
|
-
throw new D(
|
|
699
|
+
throw new D(n, "Unable to contact the Stytch servers. Are you online?");
|
|
699
700
|
case 13:
|
|
700
701
|
throw e.t0;
|
|
701
702
|
case 14:
|
|
702
|
-
if (
|
|
703
|
-
e.next =
|
|
703
|
+
if (!(h.status <= 299)) {
|
|
704
|
+
e.next = 25;
|
|
704
705
|
break;
|
|
705
706
|
}
|
|
706
|
-
return e.prev = 15, e.next = 18,
|
|
707
|
+
return e.prev = 15, e.next = 18, h.json();
|
|
707
708
|
case 18:
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
e.next = 26;
|
|
709
|
+
return p = e.sent, e.abrupt("return", p.data);
|
|
710
|
+
case 22:
|
|
711
|
+
throw e.prev = 22, e.t1 = e["catch"](15), new D(n, "Invalid JSON response from the Stytch servers.");
|
|
712
|
+
case 25:
|
|
713
|
+
if (200 === h.status || !(null === (t = h.headers.get("content-type")) || void 0 === t ? void 0 : t.includes("application/json"))) {
|
|
714
|
+
e.next = 38;
|
|
715
715
|
break;
|
|
716
716
|
}
|
|
717
|
-
|
|
718
|
-
case
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
717
|
+
return e.prev = 26, e.next = 29, h.json();
|
|
718
|
+
case 29:
|
|
719
|
+
f = e.sent, e.next = 35;
|
|
720
|
+
break;
|
|
721
|
+
case 32:
|
|
722
|
+
throw e.prev = 32, e.t2 = e["catch"](26), new D(n, "Invalid or no response from server");
|
|
723
|
+
case 35:
|
|
724
|
+
if (!("body" in f || "params" in f || "query" in f)) {
|
|
725
|
+
e.next = 37;
|
|
723
726
|
break;
|
|
724
727
|
}
|
|
725
|
-
|
|
726
|
-
case 31:
|
|
727
|
-
p = e.sent, e.next = 37;
|
|
728
|
-
break;
|
|
729
|
-
case 34:
|
|
730
|
-
throw e.prev = 34, e.t2 = e["catch"](28), new D(r, "Invalid or no response from server");
|
|
728
|
+
throw new B(f);
|
|
731
729
|
case 37:
|
|
732
|
-
|
|
733
|
-
|
|
730
|
+
throw new L(f);
|
|
731
|
+
case 38:
|
|
732
|
+
return e.prev = 38, e.next = 41, h.text();
|
|
733
|
+
case 41:
|
|
734
|
+
_ = e.sent, e.next = 47;
|
|
735
|
+
break;
|
|
736
|
+
case 44:
|
|
737
|
+
throw e.prev = 44, e.t3 = e["catch"](38), new D(n, "Invalid response from the Stytch servers.");
|
|
738
|
+
case 47:
|
|
739
|
+
if (!_.includes("Captcha required")) {
|
|
740
|
+
e.next = 49;
|
|
734
741
|
break;
|
|
735
742
|
}
|
|
736
|
-
throw new
|
|
737
|
-
case
|
|
738
|
-
throw new
|
|
739
|
-
case 40:
|
|
740
|
-
return e.prev = 40, e.next = 43, d.json();
|
|
741
|
-
case 43:
|
|
742
|
-
return f = e.sent, e.abrupt("return", f.data);
|
|
743
|
-
case 47:
|
|
744
|
-
throw e.prev = 47, e.t3 = e["catch"](40), new D(r, "Invalid response from the Stytch servers.");
|
|
743
|
+
throw new N(R.RequiredCatcha);
|
|
744
|
+
case 49:
|
|
745
|
+
throw new D(n, "Invalid response from the Stytch servers.");
|
|
745
746
|
case 50:
|
|
746
747
|
case "end":
|
|
747
748
|
return e.stop();
|
|
748
749
|
}
|
|
749
|
-
}, e, null, [[3, 9], [15,
|
|
750
|
+
}, e, null, [[3, 9], [15, 22], [26, 32], [38, 44]]);
|
|
750
751
|
}));
|
|
751
752
|
}
|
|
752
753
|
var U = new Uint8Array(16);
|
|
@@ -887,10 +888,10 @@ var X,
|
|
|
887
888
|
return r;
|
|
888
889
|
},
|
|
889
890
|
ne = function ne(e) {
|
|
890
|
-
return
|
|
891
|
+
return C(e, ["request_id", "status_code"]);
|
|
891
892
|
},
|
|
892
893
|
ie = function ie(e) {
|
|
893
|
-
return
|
|
894
|
+
return C(e, ["__user"]);
|
|
894
895
|
},
|
|
895
896
|
se = a(function e(t, r, n) {
|
|
896
897
|
var i = this,
|
|
@@ -2259,26 +2260,26 @@ function Se(e) {
|
|
|
2259
2260
|
schema: e
|
|
2260
2261
|
};
|
|
2261
2262
|
}
|
|
2262
|
-
function
|
|
2263
|
+
function Ae(e) {
|
|
2263
2264
|
return {
|
|
2264
2265
|
required: !1,
|
|
2265
2266
|
schema: e
|
|
2266
2267
|
};
|
|
2267
2268
|
}
|
|
2268
|
-
var
|
|
2269
|
+
var Ce = {
|
|
2269
2270
|
type: Se(be),
|
|
2270
2271
|
id: Se(ge),
|
|
2271
|
-
transports:
|
|
2272
|
+
transports: Ae(be)
|
|
2272
2273
|
},
|
|
2273
2274
|
Te = {
|
|
2274
|
-
appid:
|
|
2275
|
-
appidExclude:
|
|
2276
|
-
credProps:
|
|
2275
|
+
appid: Ae(be),
|
|
2276
|
+
appidExclude: Ae(be),
|
|
2277
|
+
credProps: Ae(be)
|
|
2277
2278
|
},
|
|
2278
2279
|
Oe = {
|
|
2279
|
-
appid:
|
|
2280
|
-
appidExclude:
|
|
2281
|
-
credProps:
|
|
2280
|
+
appid: Ae(be),
|
|
2281
|
+
appidExclude: Ae(be),
|
|
2282
|
+
credProps: Ae(be)
|
|
2282
2283
|
},
|
|
2283
2284
|
Ee = {
|
|
2284
2285
|
publicKey: Se({
|
|
@@ -2290,19 +2291,19 @@ var Ae = {
|
|
|
2290
2291
|
}),
|
|
2291
2292
|
challenge: Se(ge),
|
|
2292
2293
|
pubKeyCredParams: Se(be),
|
|
2293
|
-
timeout:
|
|
2294
|
-
excludeCredentials:
|
|
2295
|
-
authenticatorSelection:
|
|
2296
|
-
attestation:
|
|
2297
|
-
extensions:
|
|
2294
|
+
timeout: Ae(be),
|
|
2295
|
+
excludeCredentials: Ae([Ce]),
|
|
2296
|
+
authenticatorSelection: Ae(be),
|
|
2297
|
+
attestation: Ae(be),
|
|
2298
|
+
extensions: Ae(Te)
|
|
2298
2299
|
}),
|
|
2299
|
-
signal:
|
|
2300
|
+
signal: Ae(be)
|
|
2300
2301
|
},
|
|
2301
2302
|
Pe = {
|
|
2302
2303
|
type: Se(be),
|
|
2303
2304
|
id: Se(be),
|
|
2304
2305
|
rawId: Se(ge),
|
|
2305
|
-
authenticatorAttachment:
|
|
2306
|
+
authenticatorAttachment: Ae(be),
|
|
2306
2307
|
response: Se({
|
|
2307
2308
|
clientDataJSON: Se(ge),
|
|
2308
2309
|
attestationObject: Se(ge),
|
|
@@ -2316,22 +2317,22 @@ var Ae = {
|
|
|
2316
2317
|
})
|
|
2317
2318
|
},
|
|
2318
2319
|
xe = {
|
|
2319
|
-
mediation:
|
|
2320
|
+
mediation: Ae(be),
|
|
2320
2321
|
publicKey: Se({
|
|
2321
2322
|
challenge: Se(ge),
|
|
2322
|
-
timeout:
|
|
2323
|
-
rpId:
|
|
2324
|
-
allowCredentials:
|
|
2325
|
-
userVerification:
|
|
2326
|
-
extensions:
|
|
2323
|
+
timeout: Ae(be),
|
|
2324
|
+
rpId: Ae(be),
|
|
2325
|
+
allowCredentials: Ae([Ce]),
|
|
2326
|
+
userVerification: Ae(be),
|
|
2327
|
+
extensions: Ae(Te)
|
|
2327
2328
|
}),
|
|
2328
|
-
signal:
|
|
2329
|
+
signal: Ae(be)
|
|
2329
2330
|
},
|
|
2330
2331
|
Re = {
|
|
2331
2332
|
type: Se(be),
|
|
2332
2333
|
id: Se(be),
|
|
2333
2334
|
rawId: Se(ge),
|
|
2334
|
-
authenticatorAttachment:
|
|
2335
|
+
authenticatorAttachment: Ae(be),
|
|
2335
2336
|
response: Se({
|
|
2336
2337
|
clientDataJSON: Se(ge),
|
|
2337
2338
|
authenticatorData: Se(ge),
|
|
@@ -3030,7 +3031,8 @@ var Ge = /*#__PURE__*/function () {
|
|
|
3030
3031
|
slugPattern: null,
|
|
3031
3032
|
createOrganizationEnabled: !1,
|
|
3032
3033
|
passwordConfig: null,
|
|
3033
|
-
runDFPProtectedAuth: !1
|
|
3034
|
+
runDFPProtectedAuth: !1,
|
|
3035
|
+
rbacPolicy: null
|
|
3034
3036
|
};
|
|
3035
3037
|
});
|
|
3036
3038
|
}
|
|
@@ -3052,7 +3054,8 @@ var Ge = /*#__PURE__*/function () {
|
|
|
3052
3054
|
slugPattern: null,
|
|
3053
3055
|
createOrganizationEnabled: !1,
|
|
3054
3056
|
passwordConfig: null,
|
|
3055
|
-
runDFPProtectedAuth: !1
|
|
3057
|
+
runDFPProtectedAuth: !1,
|
|
3058
|
+
rbacPolicy: null
|
|
3056
3059
|
};
|
|
3057
3060
|
try {
|
|
3058
3061
|
return JSON.parse(e);
|
|
@@ -3071,7 +3074,8 @@ var Ge = /*#__PURE__*/function () {
|
|
|
3071
3074
|
slugPattern: null,
|
|
3072
3075
|
createOrganizationEnabled: !1,
|
|
3073
3076
|
passwordConfig: null,
|
|
3074
|
-
runDFPProtectedAuth: !1
|
|
3077
|
+
runDFPProtectedAuth: !1,
|
|
3078
|
+
rbacPolicy: null
|
|
3075
3079
|
};
|
|
3076
3080
|
}
|
|
3077
3081
|
}
|
|
@@ -3083,8 +3087,8 @@ var Ge = /*#__PURE__*/function () {
|
|
|
3083
3087
|
}], [{
|
|
3084
3088
|
key: "mapBootstrapData",
|
|
3085
3089
|
value: function mapBootstrapData(e) {
|
|
3086
|
-
var t;
|
|
3087
|
-
var
|
|
3090
|
+
var t, r;
|
|
3091
|
+
var n = null !== e.password_config ? {
|
|
3088
3092
|
ludsComplexity: e.password_config.luds_complexity,
|
|
3089
3093
|
ludsMinimumCount: e.password_config.luds_minimum_count
|
|
3090
3094
|
} : null;
|
|
@@ -3099,9 +3103,10 @@ var Ge = /*#__PURE__*/function () {
|
|
|
3099
3103
|
pkceRequiredForSso: e.pkce_required_for_sso,
|
|
3100
3104
|
slugPattern: e.slug_pattern,
|
|
3101
3105
|
createOrganizationEnabled: e.create_organization_enabled,
|
|
3102
|
-
passwordConfig:
|
|
3106
|
+
passwordConfig: n,
|
|
3103
3107
|
runDFPProtectedAuth: null !== (t = e.dfp_protected_auth_enabled) && void 0 !== t && t,
|
|
3104
|
-
dfpProtectedAuthMode: e.dfp_protected_auth_mode
|
|
3108
|
+
dfpProtectedAuthMode: e.dfp_protected_auth_mode,
|
|
3109
|
+
rbacPolicy: null !== (r = e.rbac_policy) && void 0 !== r ? r : null
|
|
3105
3110
|
};
|
|
3106
3111
|
}
|
|
3107
3112
|
}]);
|
|
@@ -3363,7 +3368,7 @@ var ot, at, ct, ut, lt, dt;
|
|
|
3363
3368
|
}(ut || (ut = {})), function (e) {
|
|
3364
3369
|
e.SMS = "sms", e.WhatsApp = "whatsapp", e.Email = "email";
|
|
3365
3370
|
}(lt || (lt = {})), function (e) {
|
|
3366
|
-
e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.PasskeyRegister = "PASSKEY_REGISTER", e.PasskeyAuthenticate = "PASSKEY_AUTHENTICATE", e.PasskeySkip = "PASSKEY_SKIP", e.PasskeyDone = "PASSKEY_DONE", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "
|
|
3371
|
+
e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.PasskeyRegister = "PASSKEY_REGISTER", e.PasskeyAuthenticate = "PASSKEY_AUTHENTICATE", e.PasskeySkip = "PASSKEY_SKIP", e.PasskeyDone = "PASSKEY_DONE", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "B2B_OAUTH_AUTHENTICATE", e.B2BOAuthDiscoveryAuthenticate = "B2B_OAUTH_DISCOVERY_AUTHENTICATE", e.B2BDiscoveryOrganizationsCreate = "B2B_DISCOVERY_ORGANIZATIONS_CREATE", e.B2BDiscoveryIntermediateSessionExchange = "B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE", e.B2BPasswordAuthenticate = "B2B_PASSWORD_AUTHENTICATE", e.B2BPasswordResetByEmailStart = "B2B_PASSWORD_RESET_BY_EMAIL_START", e.B2BPasswordResetByEmail = "B2B_PASSWORD_RESET_BY_EMAIL", e.B2BPasswordResetBySession = "B2B_PASSWORD_RESET_BY_SESSION";
|
|
3367
3372
|
}(dt || (dt = {}));
|
|
3368
3373
|
var ht,
|
|
3369
3374
|
pt,
|
|
@@ -3523,7 +3528,7 @@ var St = /*#__PURE__*/function () {
|
|
|
3523
3528
|
},
|
|
3524
3529
|
sdk: {
|
|
3525
3530
|
identifier: "Stytch.js Javascript SDK",
|
|
3526
|
-
version: "3.
|
|
3531
|
+
version: "3.3.0"
|
|
3527
3532
|
}
|
|
3528
3533
|
});
|
|
3529
3534
|
}
|
|
@@ -3637,12 +3642,12 @@ var St = /*#__PURE__*/function () {
|
|
|
3637
3642
|
}]);
|
|
3638
3643
|
return St;
|
|
3639
3644
|
}();
|
|
3640
|
-
var
|
|
3641
|
-
function
|
|
3642
|
-
_classCallCheck(this,
|
|
3645
|
+
var At = /*#__PURE__*/function () {
|
|
3646
|
+
function At(e, t, r) {
|
|
3647
|
+
_classCallCheck(this, At);
|
|
3643
3648
|
this._googleClient = e, this._publicToken = t, this._clientId = r;
|
|
3644
3649
|
}
|
|
3645
|
-
_createClass(
|
|
3650
|
+
_createClass(At, [{
|
|
3646
3651
|
key: "cancel",
|
|
3647
3652
|
value: function cancel() {
|
|
3648
3653
|
this._googleClient.cancel();
|
|
@@ -3694,12 +3699,12 @@ var Ct = /*#__PURE__*/function () {
|
|
|
3694
3699
|
});
|
|
3695
3700
|
}
|
|
3696
3701
|
}]);
|
|
3697
|
-
return
|
|
3702
|
+
return At;
|
|
3698
3703
|
}();
|
|
3699
|
-
var
|
|
3700
|
-
function
|
|
3704
|
+
var Ct = /*#__PURE__*/function () {
|
|
3705
|
+
function Ct(e, t) {
|
|
3701
3706
|
var _this6 = this;
|
|
3702
|
-
_classCallCheck(this,
|
|
3707
|
+
_classCallCheck(this, Ct);
|
|
3703
3708
|
this._publicToken = e, this.clientsideServices = t, this.createOnSuccessHandler = function (_ref5) {
|
|
3704
3709
|
var e = _ref5.loginRedirectUrl,
|
|
3705
3710
|
t = _ref5.signupRedirectUrl,
|
|
@@ -3732,7 +3737,7 @@ var At = /*#__PURE__*/function () {
|
|
|
3732
3737
|
window.location.href = e;
|
|
3733
3738
|
};
|
|
3734
3739
|
}
|
|
3735
|
-
_createClass(
|
|
3740
|
+
_createClass(Ct, [{
|
|
3736
3741
|
key: "createOneTapClient",
|
|
3737
3742
|
value: function createOneTapClient() {
|
|
3738
3743
|
return He(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
@@ -3766,9 +3771,9 @@ var At = /*#__PURE__*/function () {
|
|
|
3766
3771
|
});
|
|
3767
3772
|
case 12:
|
|
3768
3773
|
_context8.t1 = !0;
|
|
3769
|
-
_context8.t2 =
|
|
3774
|
+
_context8.t2 = At;
|
|
3770
3775
|
_context8.next = 16;
|
|
3771
|
-
return V(
|
|
3776
|
+
return V(A, function () {
|
|
3772
3777
|
return window.google.accounts.id;
|
|
3773
3778
|
});
|
|
3774
3779
|
case 16:
|
|
@@ -3837,10 +3842,10 @@ var At = /*#__PURE__*/function () {
|
|
|
3837
3842
|
}, {
|
|
3838
3843
|
key: "WillGoogleOneTapShowEmbedded",
|
|
3839
3844
|
value: function WillGoogleOneTapShowEmbedded() {
|
|
3840
|
-
return !
|
|
3845
|
+
return !Ct.WillGoogleOneTapShowBannerForUA(navigator.userAgent);
|
|
3841
3846
|
}
|
|
3842
3847
|
}]);
|
|
3843
|
-
return
|
|
3848
|
+
return Ct;
|
|
3844
3849
|
}();
|
|
3845
3850
|
function Tt(e) {
|
|
3846
3851
|
var t = e.toString(16);
|
|
@@ -4390,9 +4395,9 @@ var Wt = /*#__PURE__*/_createClass(function Wt(e, t) {
|
|
|
4390
4395
|
b = new Ye(y.getAsync()),
|
|
4391
4396
|
g = new se(e, s.endpoints.dfpBackendURL, y.getAsync(), b.executeRecaptcha),
|
|
4392
4397
|
k = new ze(s.endpoints.clientsideServicesIframeURL),
|
|
4393
|
-
w = new
|
|
4398
|
+
w = new Ct(e, k),
|
|
4394
4399
|
S = new Et(this._networkClient);
|
|
4395
|
-
var
|
|
4400
|
+
var A, C;
|
|
4396
4401
|
this.user = new ue(this._networkClient, this._subscriptionService), this.session = new le(this._networkClient, this._subscriptionService), this.magicLinks = new he(this._networkClient, this._subscriptionService, new Ot(this._dataLayer, "magic_links"), v, y.getAsync(), g), this.otps = new pe(this._networkClient, this._subscriptionService, b.executeRecaptcha, g), this.oauth = new wt(this._networkClient, this._subscriptionService, new Ot(this._dataLayer, "oauth"), y.getAsync(), {
|
|
4397
4402
|
publicToken: e,
|
|
4398
4403
|
testAPIURL: s.endpoints.testAPIURL,
|
|
@@ -4404,7 +4409,7 @@ var Wt = /*#__PURE__*/_createClass(function Wt(e, t) {
|
|
|
4404
4409
|
error_callback_registered: !1,
|
|
4405
4410
|
success_callback_registered: !1
|
|
4406
4411
|
}
|
|
4407
|
-
}),
|
|
4412
|
+
}), A = this, C = {
|
|
4408
4413
|
bootstrap: y,
|
|
4409
4414
|
clientsideServices: k,
|
|
4410
4415
|
captcha: b,
|
|
@@ -4413,6 +4418,6 @@ var Wt = /*#__PURE__*/_createClass(function Wt(e, t) {
|
|
|
4413
4418
|
publicToken: e,
|
|
4414
4419
|
dataLayer: this._dataLayer,
|
|
4415
4420
|
networkClient: this._networkClient
|
|
4416
|
-
}, Object.assign(
|
|
4421
|
+
}, Object.assign(A, _defineProperty({}, Kt, C));
|
|
4417
4422
|
});
|
|
4418
4423
|
export { ft as AuthFlowType, _t as B2BOAuthProviders, pt as B2BProducts, ht as BiometricsErrors, at as OAuthProviders, lt as OTPMethods, ut as OneTapPositions, ot as Products, mt as SDKAPIUnreachableError, dt as StytchEventType, Wt as StytchHeadlessClient, bt as StytchSDKAPIError, gt as StytchSDKNativeError, yt as StytchSDKSchemaError, vt as StytchSDKUsageError, kt as UNRECOVERABLE_ERROR_TYPES, ct as Wallets };
|