postex-auth-sdk-stage 1.2.3 → 1.2.5
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/README.md +5 -1
- package/dist/auth.d.ts +3 -0
- package/dist/postex-auth-sdk-stage.es.js +283 -274
- package/dist/postex-auth-sdk-stage.es.js.map +1 -1
- package/dist/postex-auth-sdk-stage.iife.js +1 -1
- package/dist/postex-auth-sdk-stage.iife.js.map +1 -1
- package/dist/postex-auth-sdk-stage.umd.js +1 -1
- package/dist/postex-auth-sdk-stage.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
function
|
|
1
|
+
function K() {
|
|
2
2
|
return typeof window < "u" && typeof window.PublicKeyCredential < "u" && typeof navigator < "u" && typeof navigator.credentials < "u";
|
|
3
3
|
}
|
|
4
|
-
async function
|
|
5
|
-
if (!
|
|
4
|
+
async function j() {
|
|
5
|
+
if (!K()) return !1;
|
|
6
6
|
try {
|
|
7
7
|
return await PublicKeyCredential.isConditionalMediationAvailable?.() ?? !1;
|
|
8
8
|
} catch {
|
|
9
9
|
return !1;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function y(a) {
|
|
13
13
|
const e = new Uint8Array(a);
|
|
14
14
|
let n = "";
|
|
15
15
|
for (let t = 0; t < e.byteLength; t++)
|
|
16
16
|
n += String.fromCharCode(e[t]);
|
|
17
17
|
return btoa(n);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function k(a) {
|
|
20
20
|
if (typeof a != "string" || !a)
|
|
21
21
|
throw new Error("Invalid base64: expected non-empty string");
|
|
22
22
|
const e = a.replace(/\s/g, "").replace(/-/g, "+").replace(/_/g, "/"), n = e.length % 4, t = n > 0 ? e + "=".repeat(4 - n) : e;
|
|
23
23
|
try {
|
|
24
|
-
const
|
|
25
|
-
for (let
|
|
26
|
-
|
|
27
|
-
return
|
|
24
|
+
const o = atob(t), s = new Uint8Array(o.length);
|
|
25
|
+
for (let r = 0; r < o.length; r++)
|
|
26
|
+
s[r] = o.charCodeAt(r);
|
|
27
|
+
return s.buffer;
|
|
28
28
|
} catch {
|
|
29
29
|
throw new Error(
|
|
30
30
|
"Invalid base64: string is not correctly encoded. Check challenge/credentialId from server."
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
34
|
+
function g(a) {
|
|
35
|
+
return y(a).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function J(a) {
|
|
38
38
|
return /^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$/i.test(
|
|
39
39
|
a
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function L(a) {
|
|
43
43
|
const e = a.replace(/-/g, ""), n = new Uint8Array(e.length / 2);
|
|
44
44
|
for (let t = 0; t < n.length; t++)
|
|
45
45
|
n[t] = parseInt(e.substr(t * 2, 2), 16);
|
|
46
46
|
return n.buffer;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function M(a) {
|
|
49
49
|
if (!a || typeof a != "string")
|
|
50
50
|
throw new Error("Invalid input: expected non-empty string");
|
|
51
|
-
return
|
|
51
|
+
return J(a) ? L(a) : k(a);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function _(a) {
|
|
54
54
|
return new TextEncoder().encode(a).buffer;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function W(a) {
|
|
57
57
|
return String.fromCharCode(...a);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
60
|
-
function
|
|
59
|
+
const H = "xpay_webauthn", Y = 1, u = "passkey_data", S = "passkey_email", E = "passkey_mobile_number";
|
|
60
|
+
function h() {
|
|
61
61
|
return new Promise((a, e) => {
|
|
62
|
-
const n = indexedDB.open(
|
|
62
|
+
const n = indexedDB.open(H, Y);
|
|
63
63
|
n.onerror = () => e(n.error), n.onsuccess = () => a(n.result), n.onupgradeneeded = () => {
|
|
64
64
|
const t = n.result;
|
|
65
|
-
t.objectStoreNames.contains(
|
|
65
|
+
t.objectStoreNames.contains(u) || t.createObjectStore(u);
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
async function
|
|
69
|
+
async function F() {
|
|
70
70
|
try {
|
|
71
|
-
const a = await
|
|
71
|
+
const a = await h();
|
|
72
72
|
return new Promise((e, n) => {
|
|
73
|
-
const t = a.transaction(
|
|
74
|
-
|
|
73
|
+
const t = a.transaction(u, "readonly"), s = t.objectStore(u).get(S);
|
|
74
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(s.result ?? null), t.oncomplete = () => a.close();
|
|
75
75
|
});
|
|
76
76
|
} catch {
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
async function
|
|
80
|
+
async function G(a) {
|
|
81
81
|
try {
|
|
82
|
-
const e = await
|
|
82
|
+
const e = await h();
|
|
83
83
|
return new Promise((n, t) => {
|
|
84
|
-
const
|
|
85
|
-
|
|
84
|
+
const o = e.transaction(u, "readwrite"), r = o.objectStore(u).put(a, S);
|
|
85
|
+
r.onerror = () => t(r.error), r.onsuccess = () => n(), o.oncomplete = () => e.close();
|
|
86
86
|
});
|
|
87
87
|
} catch {
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
async function
|
|
90
|
+
async function V() {
|
|
91
91
|
try {
|
|
92
|
-
const a = await
|
|
92
|
+
const a = await h();
|
|
93
93
|
return new Promise((e, n) => {
|
|
94
|
-
const t = a.transaction(
|
|
95
|
-
|
|
94
|
+
const t = a.transaction(u, "readwrite"), s = t.objectStore(u).delete(S);
|
|
95
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(), t.oncomplete = () => a.close();
|
|
96
96
|
});
|
|
97
97
|
} catch {
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
async function
|
|
100
|
+
async function z() {
|
|
101
101
|
try {
|
|
102
|
-
const a = await
|
|
102
|
+
const a = await h();
|
|
103
103
|
return new Promise((e, n) => {
|
|
104
|
-
const t = a.transaction(
|
|
105
|
-
|
|
104
|
+
const t = a.transaction(u, "readonly"), s = t.objectStore(u).get(E);
|
|
105
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(s.result ?? null), t.oncomplete = () => a.close();
|
|
106
106
|
});
|
|
107
107
|
} catch {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function X(a) {
|
|
112
112
|
try {
|
|
113
|
-
const e = await
|
|
113
|
+
const e = await h();
|
|
114
114
|
return new Promise((n, t) => {
|
|
115
|
-
const
|
|
116
|
-
|
|
115
|
+
const o = e.transaction(u, "readwrite"), r = o.objectStore(u).put(a, E);
|
|
116
|
+
r.onerror = () => t(r.error), r.onsuccess = () => n(), o.oncomplete = () => e.close();
|
|
117
117
|
});
|
|
118
118
|
} catch {
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
async function
|
|
121
|
+
async function Q() {
|
|
122
122
|
try {
|
|
123
|
-
const a = await
|
|
123
|
+
const a = await h();
|
|
124
124
|
return new Promise((e, n) => {
|
|
125
|
-
const t = a.transaction(
|
|
126
|
-
|
|
125
|
+
const t = a.transaction(u, "readwrite"), s = t.objectStore(u).delete(E);
|
|
126
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(), t.oncomplete = () => a.close();
|
|
127
127
|
});
|
|
128
128
|
} catch {
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
function
|
|
131
|
+
const x = "dpop_private_key", I = "dpop_public_key_jwk";
|
|
132
|
+
function D(a) {
|
|
133
133
|
return {
|
|
134
134
|
kty: "EC",
|
|
135
135
|
crv: "P-256",
|
|
@@ -137,7 +137,7 @@ function q(a) {
|
|
|
137
137
|
y: a.y
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
-
async function
|
|
140
|
+
async function B(a) {
|
|
141
141
|
const e = JSON.stringify({
|
|
142
142
|
crv: a.crv,
|
|
143
143
|
kty: a.kty,
|
|
@@ -147,65 +147,65 @@ async function R(a) {
|
|
|
147
147
|
"SHA-256",
|
|
148
148
|
new TextEncoder().encode(e)
|
|
149
149
|
);
|
|
150
|
-
return
|
|
150
|
+
return g(n);
|
|
151
151
|
}
|
|
152
|
-
async function
|
|
152
|
+
async function q(a) {
|
|
153
153
|
try {
|
|
154
|
-
const e = await
|
|
154
|
+
const e = await h();
|
|
155
155
|
return new Promise((n, t) => {
|
|
156
|
-
const
|
|
157
|
-
|
|
156
|
+
const o = e.transaction(u, "readwrite"), r = o.objectStore(u).put(a, x);
|
|
157
|
+
r.onerror = () => t(r.error), r.onsuccess = () => n(), o.oncomplete = () => e.close();
|
|
158
158
|
});
|
|
159
159
|
} catch (e) {
|
|
160
160
|
console.error("Failed to store DPoP private key:", e);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
async function
|
|
163
|
+
async function Z(a) {
|
|
164
164
|
try {
|
|
165
|
-
const e = await
|
|
165
|
+
const e = await h();
|
|
166
166
|
return new Promise((n, t) => {
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const o = e.transaction(u, "readwrite"), r = o.objectStore(u).put(a, I);
|
|
168
|
+
r.onerror = () => t(r.error), r.onsuccess = () => n(), o.oncomplete = () => e.close();
|
|
169
169
|
});
|
|
170
170
|
} catch (e) {
|
|
171
171
|
console.error("Failed to store DPoP public key JWK:", e);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function A() {
|
|
175
175
|
try {
|
|
176
|
-
const a = await
|
|
176
|
+
const a = await h();
|
|
177
177
|
return new Promise((e, n) => {
|
|
178
|
-
const t = a.transaction(
|
|
179
|
-
|
|
178
|
+
const t = a.transaction(u, "readonly"), s = t.objectStore(u).get(x);
|
|
179
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(s.result ?? null), t.oncomplete = () => a.close();
|
|
180
180
|
});
|
|
181
181
|
} catch {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
185
|
+
async function R() {
|
|
186
186
|
try {
|
|
187
|
-
const a = await
|
|
187
|
+
const a = await h();
|
|
188
188
|
return new Promise((e, n) => {
|
|
189
|
-
const t = a.transaction(
|
|
190
|
-
|
|
189
|
+
const t = a.transaction(u, "readonly"), s = t.objectStore(u).get(I);
|
|
190
|
+
s.onerror = () => n(s.error), s.onsuccess = () => e(s.result ?? null), t.oncomplete = () => a.close();
|
|
191
191
|
});
|
|
192
192
|
} catch {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function U() {
|
|
197
197
|
try {
|
|
198
|
-
const a = await
|
|
198
|
+
const a = await h();
|
|
199
199
|
return new Promise((e, n) => {
|
|
200
|
-
const t = a.transaction(
|
|
201
|
-
|
|
200
|
+
const t = a.transaction(u, "readwrite"), o = t.objectStore(u);
|
|
201
|
+
o.delete(x), o.delete(I), t.onerror = () => n(t.error), t.oncomplete = () => {
|
|
202
202
|
a.close(), e();
|
|
203
203
|
};
|
|
204
204
|
});
|
|
205
205
|
} catch {
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
async function
|
|
208
|
+
async function T() {
|
|
209
209
|
const a = await crypto.subtle.generateKey(
|
|
210
210
|
{
|
|
211
211
|
name: "ECDSA",
|
|
@@ -214,90 +214,99 @@ async function g() {
|
|
|
214
214
|
!1,
|
|
215
215
|
// Private key is non-extractable
|
|
216
216
|
["sign", "verify"]
|
|
217
|
-
), e = await crypto.subtle.exportKey("jwk", a.publicKey), n =
|
|
218
|
-
return await
|
|
217
|
+
), e = await crypto.subtle.exportKey("jwk", a.publicKey), n = D(e), t = await B(n);
|
|
218
|
+
return await q(a.privateKey), await Z(n), { publicKey: n, thumbprint: t };
|
|
219
219
|
}
|
|
220
|
-
async function
|
|
220
|
+
async function w(a, e, n) {
|
|
221
221
|
try {
|
|
222
|
-
const t = await
|
|
223
|
-
if (!t || !
|
|
224
|
-
const
|
|
222
|
+
const t = await A(), o = await R();
|
|
223
|
+
if (!t || !o) return null;
|
|
224
|
+
const s = {
|
|
225
225
|
typ: "dpop+jwt",
|
|
226
226
|
alg: "ES256",
|
|
227
|
-
jwk:
|
|
227
|
+
jwk: o
|
|
228
228
|
// Public key in JWK format
|
|
229
|
-
},
|
|
229
|
+
}, r = new URL(
|
|
230
230
|
e,
|
|
231
231
|
typeof window < "u" ? window.location.origin : void 0
|
|
232
|
-
), i = `${
|
|
232
|
+
), i = `${r.origin}${r.pathname}`, d = {
|
|
233
233
|
jti: crypto.randomUUID(),
|
|
234
234
|
htm: a.toUpperCase(),
|
|
235
235
|
htu: i,
|
|
236
236
|
iat: Math.floor(Date.now() / 1e3)
|
|
237
237
|
};
|
|
238
238
|
if (n) {
|
|
239
|
-
const
|
|
240
|
-
|
|
239
|
+
const P = new TextEncoder().encode(n), $ = await crypto.subtle.digest("SHA-256", P);
|
|
240
|
+
d.ath = g($);
|
|
241
241
|
}
|
|
242
|
-
const l =
|
|
243
|
-
new TextEncoder().encode(JSON.stringify(
|
|
244
|
-
), c =
|
|
245
|
-
new TextEncoder().encode(JSON.stringify(
|
|
246
|
-
),
|
|
242
|
+
const l = g(
|
|
243
|
+
new TextEncoder().encode(JSON.stringify(s)).buffer
|
|
244
|
+
), c = g(
|
|
245
|
+
new TextEncoder().encode(JSON.stringify(d)).buffer
|
|
246
|
+
), p = `${l}.${c}`, f = await crypto.subtle.sign(
|
|
247
247
|
{
|
|
248
248
|
name: "ECDSA",
|
|
249
249
|
hash: { name: "SHA-256" }
|
|
250
250
|
},
|
|
251
251
|
t,
|
|
252
|
-
new TextEncoder().encode(
|
|
253
|
-
),
|
|
254
|
-
return `${l}.${c}.${
|
|
252
|
+
new TextEncoder().encode(p)
|
|
253
|
+
), b = g(f);
|
|
254
|
+
return `${l}.${c}.${b}`;
|
|
255
255
|
} catch (t) {
|
|
256
256
|
return console.error("Failed to generate DPoP proof:", t), null;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
async function
|
|
260
|
-
return await
|
|
259
|
+
async function ee() {
|
|
260
|
+
return await A() !== null;
|
|
261
261
|
}
|
|
262
|
-
const
|
|
263
|
-
isWebAuthnSupported:
|
|
264
|
-
isConditionalUISupported:
|
|
265
|
-
arrayBufferToBase64:
|
|
266
|
-
base64ToArrayBuffer:
|
|
267
|
-
arrayBufferToBase64url:
|
|
268
|
-
base64urlToArrayBuffer:
|
|
269
|
-
stringToArrayBuffer:
|
|
270
|
-
uint8ArrayToString:
|
|
271
|
-
getPasskeyEmail:
|
|
272
|
-
setPasskeyEmail:
|
|
273
|
-
clearPasskeyEmail:
|
|
274
|
-
getPasskeyMobileNumber:
|
|
275
|
-
setPasskeyMobileNumber:
|
|
276
|
-
clearPasskeyMobileNumber:
|
|
277
|
-
toMinimalJWK:
|
|
278
|
-
calculateThumbprint:
|
|
279
|
-
getDPoPKey:
|
|
280
|
-
getDPoPPublicKeyJWK:
|
|
281
|
-
clearDPoPKey:
|
|
282
|
-
generateDPoPKeyPair:
|
|
283
|
-
generateDPoPProof:
|
|
284
|
-
isDPoPEnabled:
|
|
285
|
-
storeDPoPKey:
|
|
262
|
+
const te = q, N = {
|
|
263
|
+
isWebAuthnSupported: K,
|
|
264
|
+
isConditionalUISupported: j,
|
|
265
|
+
arrayBufferToBase64: y,
|
|
266
|
+
base64ToArrayBuffer: k,
|
|
267
|
+
arrayBufferToBase64url: g,
|
|
268
|
+
base64urlToArrayBuffer: M,
|
|
269
|
+
stringToArrayBuffer: _,
|
|
270
|
+
uint8ArrayToString: W,
|
|
271
|
+
getPasskeyEmail: F,
|
|
272
|
+
setPasskeyEmail: G,
|
|
273
|
+
clearPasskeyEmail: V,
|
|
274
|
+
getPasskeyMobileNumber: z,
|
|
275
|
+
setPasskeyMobileNumber: X,
|
|
276
|
+
clearPasskeyMobileNumber: Q,
|
|
277
|
+
toMinimalJWK: D,
|
|
278
|
+
calculateThumbprint: B,
|
|
279
|
+
getDPoPKey: A,
|
|
280
|
+
getDPoPPublicKeyJWK: R,
|
|
281
|
+
clearDPoPKey: U,
|
|
282
|
+
generateDPoPKeyPair: T,
|
|
283
|
+
generateDPoPProof: w,
|
|
284
|
+
isDPoPEnabled: ee,
|
|
285
|
+
storeDPoPKey: te
|
|
286
|
+
};
|
|
287
|
+
typeof window < "u" && (window.WebAuthn = N);
|
|
288
|
+
const ne = typeof window < "u" ? window : globalThis;
|
|
289
|
+
ne.WebAuthn = N;
|
|
290
|
+
const m = "postex-auth-token", se = "postexglobal", oe = {
|
|
291
|
+
xstak: "https://auth-stage.xstak.com/public/v1",
|
|
292
|
+
postex: "https://auth-stage.postex.pk/public/v1",
|
|
293
|
+
callcourier: "https://auth-stage.callcourier.com.pk/public/v1",
|
|
294
|
+
postexglobal: "https://auth-stage.postexglobal.com/public/v1"
|
|
286
295
|
};
|
|
287
|
-
typeof window < "u" && (window.WebAuthn = $);
|
|
288
|
-
const oe = typeof window < "u" ? window : globalThis;
|
|
289
|
-
oe.WebAuthn = $;
|
|
290
|
-
const P = "postex-auth-token", k = "https://auth-stage.postexglobal.com/public/v1";
|
|
291
296
|
class re extends Error {
|
|
292
297
|
constructor(e, n, t) {
|
|
293
298
|
super(t ?? `Request failed with status ${e}`), this.response = { status: e, data: n }, this.name = "AuthSDKFetchError";
|
|
294
299
|
}
|
|
295
300
|
}
|
|
296
|
-
const
|
|
297
|
-
class
|
|
301
|
+
const O = "auth_sdk_id_token", v = "auth_sdk_refresh_token";
|
|
302
|
+
class C {
|
|
298
303
|
constructor(e) {
|
|
299
304
|
this.config = e;
|
|
300
305
|
}
|
|
306
|
+
getBaseUrl() {
|
|
307
|
+
const e = this.config.appId ?? se;
|
|
308
|
+
return oe[e];
|
|
309
|
+
}
|
|
301
310
|
normalizeAuthIdentifier(e) {
|
|
302
311
|
return typeof e == "string" ? { email: e } : {
|
|
303
312
|
email: e.email,
|
|
@@ -305,36 +314,36 @@ class U {
|
|
|
305
314
|
};
|
|
306
315
|
}
|
|
307
316
|
buildUrl(e, n) {
|
|
308
|
-
const t =
|
|
309
|
-
if (!n || Object.keys(n).length === 0) return
|
|
310
|
-
const
|
|
311
|
-
return `${
|
|
317
|
+
const t = this.getBaseUrl().replace(/\/$/, ""), o = e.startsWith("/") ? e : `/${e}`, s = `${t}${o}`;
|
|
318
|
+
if (!n || Object.keys(n).length === 0) return s;
|
|
319
|
+
const r = new URLSearchParams(n).toString();
|
|
320
|
+
return `${s}?${r}`;
|
|
312
321
|
}
|
|
313
322
|
async request(e, n, t) {
|
|
314
|
-
const
|
|
323
|
+
const o = this.buildUrl(n, t?.params), s = {
|
|
315
324
|
"Content-Type": "application/json",
|
|
316
325
|
Accept: "application/json",
|
|
317
326
|
"X-API-Key": this.config.apiKey ?? "",
|
|
318
327
|
...t?.headers
|
|
319
|
-
},
|
|
328
|
+
}, r = {
|
|
320
329
|
method: e,
|
|
321
330
|
credentials: "include",
|
|
322
|
-
headers:
|
|
331
|
+
headers: s
|
|
323
332
|
};
|
|
324
|
-
t?.body !== void 0 && t?.body !== null && (
|
|
325
|
-
const i = await fetch(
|
|
333
|
+
t?.body !== void 0 && t?.body !== null && (r.body = JSON.stringify(t.body));
|
|
334
|
+
const i = await fetch(o, r);
|
|
326
335
|
if (!i.ok) {
|
|
327
336
|
let c;
|
|
328
337
|
try {
|
|
329
|
-
const
|
|
330
|
-
c =
|
|
338
|
+
const p = await i.text();
|
|
339
|
+
c = p ? JSON.parse(p) : void 0;
|
|
331
340
|
} catch {
|
|
332
341
|
c = void 0;
|
|
333
342
|
}
|
|
334
343
|
throw i.status === 401 && await this.clearTokens(), new re(i.status, c);
|
|
335
344
|
}
|
|
336
|
-
const
|
|
337
|
-
return { data:
|
|
345
|
+
const d = await i.text();
|
|
346
|
+
return { data: d ? JSON.parse(d) : {} };
|
|
338
347
|
}
|
|
339
348
|
/**
|
|
340
349
|
* Returns auth headers (Authorization + DPoP) for the given request.
|
|
@@ -343,16 +352,16 @@ class U {
|
|
|
343
352
|
* @param url - Full request URL
|
|
344
353
|
*/
|
|
345
354
|
async getRequestAuthHeaders(e, n) {
|
|
346
|
-
const t = localStorage.getItem(
|
|
355
|
+
const t = localStorage.getItem(m);
|
|
347
356
|
if (!t) return {};
|
|
348
|
-
const
|
|
357
|
+
const o = n.startsWith("http") ? n : `${this.getBaseUrl()}${n}`, s = await w(
|
|
349
358
|
e.toUpperCase(),
|
|
350
|
-
|
|
359
|
+
o,
|
|
351
360
|
t
|
|
352
|
-
),
|
|
361
|
+
), r = {
|
|
353
362
|
Authorization: `Bearer ${t}`
|
|
354
363
|
};
|
|
355
|
-
return
|
|
364
|
+
return s && (r.DPoP = s), r;
|
|
356
365
|
}
|
|
357
366
|
/**
|
|
358
367
|
* GET /auth/status - Check if client has trusted device session and what auth method is available.
|
|
@@ -373,12 +382,12 @@ class U {
|
|
|
373
382
|
async initiateAuth(e) {
|
|
374
383
|
const n = this.normalizeAuthIdentifier(e), t = await this.request("POST", "/auth/initiate", {
|
|
375
384
|
body: n
|
|
376
|
-
}),
|
|
385
|
+
}), o = t.data.data ?? t.data;
|
|
377
386
|
return {
|
|
378
|
-
status:
|
|
379
|
-
challenge:
|
|
380
|
-
credentialIds:
|
|
381
|
-
rp:
|
|
387
|
+
status: o.status,
|
|
388
|
+
challenge: o.challenge,
|
|
389
|
+
credentialIds: o.credentialIds,
|
|
390
|
+
rp: o.rp
|
|
382
391
|
};
|
|
383
392
|
}
|
|
384
393
|
/**
|
|
@@ -386,29 +395,29 @@ class U {
|
|
|
386
395
|
* Stores tokens from the response.
|
|
387
396
|
*/
|
|
388
397
|
async verifyOTP(e) {
|
|
389
|
-
await
|
|
390
|
-
const n = await
|
|
398
|
+
await T();
|
|
399
|
+
const n = await w(
|
|
391
400
|
"POST",
|
|
392
|
-
`${
|
|
401
|
+
`${this.getBaseUrl()}/otp/verify`
|
|
393
402
|
), t = await this.request("POST", "/otp/verify", {
|
|
394
403
|
body: { otp: e },
|
|
395
404
|
headers: n ? { DPoP: n } : {}
|
|
396
|
-
}),
|
|
397
|
-
return
|
|
398
|
-
accessToken:
|
|
405
|
+
}), o = t.data.data ?? t.data, s = o.AuthenticationResult ?? o, r = s.access_token ?? s.accessToken ?? s.AccessToken, i = s.refresh_token ?? s.refreshToken ?? s.RefreshToken, d = s.id_token ?? s.idToken ?? s.IdToken, l = s.expires_in ?? s.expiresIn ?? s.ExpiresIn ?? 3600, c = s.token_type ?? s.tokenType ?? s.TokenType ?? "Bearer";
|
|
406
|
+
return r && await this.storeTokens({
|
|
407
|
+
accessToken: r,
|
|
399
408
|
refreshToken: i ?? "",
|
|
400
|
-
idToken:
|
|
409
|
+
idToken: d ?? "",
|
|
401
410
|
expiresIn: l ?? 3600,
|
|
402
411
|
tokenType: c ?? "Bearer"
|
|
403
412
|
}), {
|
|
404
|
-
access_token:
|
|
413
|
+
access_token: r,
|
|
405
414
|
refresh_token: i ?? "",
|
|
406
|
-
id_token:
|
|
415
|
+
id_token: d ?? "",
|
|
407
416
|
expires_in: l,
|
|
408
417
|
token_type: c,
|
|
409
|
-
verified:
|
|
410
|
-
email:
|
|
411
|
-
...
|
|
418
|
+
verified: s.verified ?? s.Verified ?? !0,
|
|
419
|
+
email: s.email ?? s.Email ?? "",
|
|
420
|
+
...s
|
|
412
421
|
};
|
|
413
422
|
}
|
|
414
423
|
/**
|
|
@@ -431,29 +440,29 @@ class U {
|
|
|
431
440
|
mobileNumber: e,
|
|
432
441
|
otp: n
|
|
433
442
|
}) {
|
|
434
|
-
await
|
|
435
|
-
const t = await
|
|
443
|
+
await T();
|
|
444
|
+
const t = await w(
|
|
436
445
|
"POST",
|
|
437
|
-
`${
|
|
438
|
-
),
|
|
446
|
+
`${this.getBaseUrl()}/otp/signup/verify`
|
|
447
|
+
), o = await this.request("POST", "/otp/signup/verify", {
|
|
439
448
|
body: { mobileNumber: e, otp: n },
|
|
440
449
|
headers: t ? { DPoP: t } : {}
|
|
441
|
-
}),
|
|
450
|
+
}), s = o.data.data ?? o.data, r = s.AuthenticationResult ?? s, i = r.access_token ?? r.accessToken ?? r.AccessToken, d = r.refresh_token ?? r.refreshToken ?? r.RefreshToken, l = r.id_token ?? r.idToken ?? r.IdToken, c = r.expires_in ?? r.expiresIn ?? r.ExpiresIn ?? 3600, p = r.token_type ?? r.tokenType ?? r.TokenType ?? "Bearer";
|
|
442
451
|
return i && await this.storeTokens({
|
|
443
452
|
accessToken: i,
|
|
444
|
-
refreshToken:
|
|
453
|
+
refreshToken: d ?? "",
|
|
445
454
|
idToken: l ?? "",
|
|
446
455
|
expiresIn: c ?? 3600,
|
|
447
|
-
tokenType:
|
|
456
|
+
tokenType: p ?? "Bearer"
|
|
448
457
|
}), {
|
|
449
458
|
access_token: i,
|
|
450
|
-
refresh_token:
|
|
459
|
+
refresh_token: d ?? "",
|
|
451
460
|
id_token: l ?? "",
|
|
452
461
|
expires_in: c,
|
|
453
|
-
token_type:
|
|
454
|
-
verified:
|
|
455
|
-
email:
|
|
456
|
-
...
|
|
462
|
+
token_type: p,
|
|
463
|
+
verified: r.verified ?? r.Verified ?? !0,
|
|
464
|
+
email: r.email ?? r.Email ?? "",
|
|
465
|
+
...r
|
|
457
466
|
};
|
|
458
467
|
}
|
|
459
468
|
/**
|
|
@@ -465,11 +474,11 @@ class U {
|
|
|
465
474
|
}) {
|
|
466
475
|
const t = await this.request("POST", "/otp/signup/resend", {
|
|
467
476
|
body: { email: n, mobileNumber: e }
|
|
468
|
-
}),
|
|
477
|
+
}), o = t.data.data ?? t.data;
|
|
469
478
|
return {
|
|
470
|
-
success:
|
|
471
|
-
message:
|
|
472
|
-
...
|
|
479
|
+
success: o.success ?? !0,
|
|
480
|
+
message: o.message,
|
|
481
|
+
...o
|
|
473
482
|
};
|
|
474
483
|
}
|
|
475
484
|
/**
|
|
@@ -493,19 +502,19 @@ class U {
|
|
|
493
502
|
{
|
|
494
503
|
body: {}
|
|
495
504
|
}
|
|
496
|
-
), n = e.data.data ?? e.data, t = n.AuthenticationResult ?? n,
|
|
497
|
-
return
|
|
498
|
-
accessToken:
|
|
499
|
-
refreshToken:
|
|
500
|
-
idToken:
|
|
505
|
+
), n = e.data.data ?? e.data, t = n.AuthenticationResult ?? n, o = t.access_token ?? t.accessToken ?? t.AccessToken, s = t.refresh_token ?? t.refreshToken ?? t.RefreshToken, r = t.id_token ?? t.idToken ?? t.IdToken, i = t.expires_in ?? t.expiresIn ?? t.ExpiresIn ?? 3600, d = t.token_type ?? t.tokenType ?? t.TokenType ?? "Bearer";
|
|
506
|
+
return o && await this.storeTokens({
|
|
507
|
+
accessToken: o,
|
|
508
|
+
refreshToken: s ?? "",
|
|
509
|
+
idToken: r ?? "",
|
|
501
510
|
expiresIn: i ?? 3600,
|
|
502
|
-
tokenType:
|
|
511
|
+
tokenType: d ?? "Bearer"
|
|
503
512
|
}), {
|
|
504
|
-
access_token:
|
|
505
|
-
refresh_token:
|
|
506
|
-
id_token:
|
|
513
|
+
access_token: o,
|
|
514
|
+
refresh_token: s ?? "",
|
|
515
|
+
id_token: r ?? "",
|
|
507
516
|
expires_in: i,
|
|
508
|
-
token_type:
|
|
517
|
+
token_type: d,
|
|
509
518
|
verified: t.verified ?? t.Verified ?? !0,
|
|
510
519
|
email: t.email ?? t.Email ?? "",
|
|
511
520
|
...t
|
|
@@ -526,23 +535,23 @@ class U {
|
|
|
526
535
|
let t;
|
|
527
536
|
if (n?.user?.id)
|
|
528
537
|
try {
|
|
529
|
-
t =
|
|
538
|
+
t = k(n.user.id);
|
|
530
539
|
} catch {
|
|
531
|
-
t =
|
|
540
|
+
t = _(n.user.id);
|
|
532
541
|
}
|
|
533
542
|
else
|
|
534
|
-
t =
|
|
535
|
-
const
|
|
543
|
+
t = _(e);
|
|
544
|
+
const o = (n.pubKeyCredParams ?? [
|
|
536
545
|
{ type: "public-key", alg: -7 },
|
|
537
546
|
{ type: "public-key", alg: -257 }
|
|
538
547
|
]).map((f) => ({
|
|
539
548
|
type: "public-key",
|
|
540
549
|
alg: f.alg
|
|
541
|
-
})),
|
|
550
|
+
})), s = n.excludeCredentials?.map((f) => ({
|
|
542
551
|
type: "public-key",
|
|
543
|
-
id:
|
|
544
|
-
})),
|
|
545
|
-
challenge:
|
|
552
|
+
id: k(f.id)
|
|
553
|
+
})), r = {
|
|
554
|
+
challenge: k(n.challenge),
|
|
546
555
|
rp: {
|
|
547
556
|
name: n.rp?.name ?? "XPay",
|
|
548
557
|
id: n.rp?.id ?? window.location.hostname
|
|
@@ -552,8 +561,8 @@ class U {
|
|
|
552
561
|
name: n.user?.name ?? e,
|
|
553
562
|
displayName: n.user?.displayName ?? e
|
|
554
563
|
},
|
|
555
|
-
pubKeyCredParams:
|
|
556
|
-
excludeCredentials:
|
|
564
|
+
pubKeyCredParams: o,
|
|
565
|
+
excludeCredentials: s,
|
|
557
566
|
timeout: n.timeout ?? 6e4,
|
|
558
567
|
attestation: n.attestation ?? "none",
|
|
559
568
|
authenticatorSelection: n.authenticatorSelection ?? {
|
|
@@ -561,20 +570,20 @@ class U {
|
|
|
561
570
|
userVerification: "required"
|
|
562
571
|
}
|
|
563
572
|
}, i = await navigator.credentials.create({
|
|
564
|
-
publicKey:
|
|
573
|
+
publicKey: r
|
|
565
574
|
});
|
|
566
575
|
if (!i) throw new Error("Credential creation failed");
|
|
567
|
-
const
|
|
568
|
-
clientDataJSON:
|
|
569
|
-
attestationObject:
|
|
570
|
-
rawId:
|
|
576
|
+
const d = i.response, l = {
|
|
577
|
+
clientDataJSON: y(d.clientDataJSON),
|
|
578
|
+
attestationObject: y(d.attestationObject),
|
|
579
|
+
rawId: y(i.rawId)
|
|
571
580
|
};
|
|
572
581
|
if (!l.rawId) throw new Error("Raw ID is required");
|
|
573
|
-
await
|
|
574
|
-
const c = await
|
|
582
|
+
await T();
|
|
583
|
+
const c = await w(
|
|
575
584
|
"POST",
|
|
576
|
-
`${
|
|
577
|
-
),
|
|
585
|
+
`${this.getBaseUrl()}/webauthn/register/challenge`
|
|
586
|
+
), p = await this.request(
|
|
578
587
|
"POST",
|
|
579
588
|
"/webauthn/register/challenge",
|
|
580
589
|
{
|
|
@@ -582,7 +591,7 @@ class U {
|
|
|
582
591
|
headers: c ? { DPoP: c } : {}
|
|
583
592
|
}
|
|
584
593
|
);
|
|
585
|
-
return
|
|
594
|
+
return p.data.data ?? p.data;
|
|
586
595
|
}
|
|
587
596
|
/**
|
|
588
597
|
* POST /webauthn/authenticate/challenge - Authenticate with passkey.
|
|
@@ -592,13 +601,13 @@ class U {
|
|
|
592
601
|
rp: n,
|
|
593
602
|
credentialIds: t
|
|
594
603
|
}) {
|
|
595
|
-
const
|
|
604
|
+
const o = await navigator.credentials.get({
|
|
596
605
|
publicKey: {
|
|
597
|
-
challenge:
|
|
606
|
+
challenge: k(e),
|
|
598
607
|
rpId: n?.host ?? void 0,
|
|
599
|
-
allowCredentials: t.map((
|
|
608
|
+
allowCredentials: t.map((P) => ({
|
|
600
609
|
type: "public-key",
|
|
601
|
-
id:
|
|
610
|
+
id: k(P)
|
|
602
611
|
// Hint browser about possible transports for faster authenticator discovery
|
|
603
612
|
// transports: ["internal", "hybrid"] as AuthenticatorTransport[],
|
|
604
613
|
})),
|
|
@@ -606,38 +615,38 @@ class U {
|
|
|
606
615
|
userVerification: "required"
|
|
607
616
|
}
|
|
608
617
|
});
|
|
609
|
-
if (!
|
|
610
|
-
const
|
|
611
|
-
clientDataJSON:
|
|
612
|
-
authenticatorData:
|
|
613
|
-
|
|
618
|
+
if (!o) throw new Error("Authentication failed");
|
|
619
|
+
const s = o.response, r = {
|
|
620
|
+
clientDataJSON: y(s.clientDataJSON),
|
|
621
|
+
authenticatorData: y(
|
|
622
|
+
s.authenticatorData
|
|
614
623
|
),
|
|
615
|
-
signature:
|
|
616
|
-
rawId:
|
|
617
|
-
userHandle:
|
|
624
|
+
signature: y(s.signature),
|
|
625
|
+
rawId: y(o.rawId),
|
|
626
|
+
userHandle: s.userHandle ? y(s.userHandle) : ""
|
|
618
627
|
};
|
|
619
|
-
await
|
|
620
|
-
const i = await
|
|
628
|
+
await T();
|
|
629
|
+
const i = await w(
|
|
621
630
|
"POST",
|
|
622
|
-
`${
|
|
623
|
-
),
|
|
631
|
+
`${this.getBaseUrl()}/webauthn/authenticate/challenge`
|
|
632
|
+
), d = await this.request(
|
|
624
633
|
"POST",
|
|
625
634
|
"/webauthn/authenticate/challenge",
|
|
626
635
|
{
|
|
627
|
-
body:
|
|
636
|
+
body: r,
|
|
628
637
|
headers: i ? { DPoP: i } : {}
|
|
629
638
|
}
|
|
630
|
-
), l =
|
|
631
|
-
return
|
|
632
|
-
accessToken:
|
|
639
|
+
), l = d.data.data ?? d.data, c = l.AuthenticationResult ?? l, p = c.AccessToken ?? c.accessToken ?? c.access_token, f = c.RefreshToken ?? c.refreshToken ?? c.refresh_token, b = c.IdToken ?? c.idToken ?? c.id_token;
|
|
640
|
+
return p && await this.storeTokens({
|
|
641
|
+
accessToken: p,
|
|
633
642
|
refreshToken: f ?? "",
|
|
634
|
-
idToken:
|
|
643
|
+
idToken: b ?? "",
|
|
635
644
|
expiresIn: c.expiresIn ?? c.ExpiresIn ?? 3600,
|
|
636
645
|
tokenType: c.tokenType ?? c.token_type ?? "Bearer"
|
|
637
646
|
}), {
|
|
638
|
-
access_token:
|
|
647
|
+
access_token: p,
|
|
639
648
|
refresh_token: f ?? "",
|
|
640
|
-
id_token:
|
|
649
|
+
id_token: b,
|
|
641
650
|
email: c.email,
|
|
642
651
|
name: c.name ?? c.userName,
|
|
643
652
|
expiresIn: c.expiresIn ?? c.ExpiresIn,
|
|
@@ -649,50 +658,50 @@ class U {
|
|
|
649
658
|
* GET /webauthn/credentials/:username - Get user's passkey status.
|
|
650
659
|
*/
|
|
651
660
|
async getPasskeyStatus(e) {
|
|
652
|
-
const t = `/webauthn/credentials/${encodeURIComponent(e)}`,
|
|
653
|
-
headers:
|
|
654
|
-
}),
|
|
661
|
+
const t = `/webauthn/credentials/${encodeURIComponent(e)}`, o = await this.signRequest("GET", t), s = await this.request("GET", t, {
|
|
662
|
+
headers: o.headers
|
|
663
|
+
}), r = s.data.data ?? s.data;
|
|
655
664
|
return {
|
|
656
|
-
...
|
|
657
|
-
hasCredentials: !!(
|
|
665
|
+
...r,
|
|
666
|
+
hasCredentials: !!(r.hasCredentials ?? r.credentialId)
|
|
658
667
|
};
|
|
659
668
|
}
|
|
660
669
|
/**
|
|
661
670
|
* DELETE /webauthn/credentials/:username - Remove passkey.
|
|
662
671
|
*/
|
|
663
672
|
async removePasskey(e) {
|
|
664
|
-
const t = `/webauthn/credentials/${encodeURIComponent(e)}`,
|
|
673
|
+
const t = `/webauthn/credentials/${encodeURIComponent(e)}`, o = await this.signRequest("DELETE", t);
|
|
665
674
|
await this.request("DELETE", t, {
|
|
666
|
-
headers:
|
|
675
|
+
headers: o.headers
|
|
667
676
|
});
|
|
668
677
|
}
|
|
669
678
|
/**
|
|
670
679
|
* Signs a request with DPoP and Authorization headers (internal use).
|
|
671
680
|
*/
|
|
672
681
|
async signRequest(e, n, t = {}) {
|
|
673
|
-
const
|
|
674
|
-
return { ...t, headers: { ...t.headers, ...
|
|
682
|
+
const o = n.startsWith("http") ? n : `${this.getBaseUrl()}${n}`, s = await this.getRequestAuthHeaders(e, o);
|
|
683
|
+
return { ...t, headers: { ...t.headers, ...s } };
|
|
675
684
|
}
|
|
676
685
|
/**
|
|
677
686
|
* Replaces native fetch or Axios with a DPoP-signed version.
|
|
678
687
|
*/
|
|
679
688
|
async authenticatedFetch(e, n) {
|
|
680
|
-
const t = typeof e == "string" ? e : e instanceof URL ? e.toString() : e.url,
|
|
689
|
+
const t = typeof e == "string" ? e : e instanceof URL ? e.toString() : e.url, o = n?.method || "GET", s = await this.signRequest(o, t, {
|
|
681
690
|
headers: n?.headers
|
|
682
691
|
});
|
|
683
|
-
return fetch(e, { ...n, headers:
|
|
692
|
+
return fetch(e, { ...n, headers: s.headers });
|
|
684
693
|
}
|
|
685
694
|
/**
|
|
686
695
|
* Store tokens from /webauthn/authenticate (per spec: sessionStorage preferred).
|
|
687
696
|
*/
|
|
688
697
|
async storeTokens(e) {
|
|
689
|
-
localStorage.setItem(
|
|
698
|
+
localStorage.setItem(m, e.accessToken), e.refreshToken && localStorage.setItem(v, e.refreshToken), e.idToken && localStorage.setItem(O, e.idToken);
|
|
690
699
|
}
|
|
691
700
|
/**
|
|
692
701
|
* Clear stored tokens (call on logout).
|
|
693
702
|
*/
|
|
694
703
|
async clearTokens() {
|
|
695
|
-
localStorage.removeItem(
|
|
704
|
+
localStorage.removeItem(m), localStorage.removeItem(O), localStorage.removeItem(v);
|
|
696
705
|
}
|
|
697
706
|
/**
|
|
698
707
|
* POST /auth/refresh - Refresh access token using server-stored refresh token.
|
|
@@ -702,17 +711,17 @@ class U {
|
|
|
702
711
|
async refreshToken() {
|
|
703
712
|
const e = await this.request("POST", "/auth/refresh", {
|
|
704
713
|
body: {}
|
|
705
|
-
}), n = e.data.data ?? e.data, t = n.access_token,
|
|
714
|
+
}), n = e.data.data ?? e.data, t = n.access_token, o = n.id_token ?? "", s = n.token_type ?? "Bearer", r = n.expires_in ?? 3600;
|
|
706
715
|
return t && await this.storeTokens({
|
|
707
716
|
accessToken: t,
|
|
708
|
-
idToken:
|
|
709
|
-
expiresIn:
|
|
710
|
-
tokenType:
|
|
717
|
+
idToken: o,
|
|
718
|
+
expiresIn: r,
|
|
719
|
+
tokenType: s
|
|
711
720
|
}), {
|
|
712
721
|
access_token: t,
|
|
713
|
-
id_token:
|
|
714
|
-
token_type:
|
|
715
|
-
expires_in:
|
|
722
|
+
id_token: o,
|
|
723
|
+
token_type: s,
|
|
724
|
+
expires_in: r
|
|
716
725
|
};
|
|
717
726
|
}
|
|
718
727
|
/**
|
|
@@ -722,43 +731,43 @@ class U {
|
|
|
722
731
|
async logout() {
|
|
723
732
|
try {
|
|
724
733
|
const e = await this.getAccessToken(), n = {};
|
|
725
|
-
e && (n.Authorization = `Bearer ${e}`), await this.request("POST", "/auth/logout", { body: {}, headers: n }),
|
|
734
|
+
e && (n.Authorization = `Bearer ${e}`), await this.request("POST", "/auth/logout", { body: {}, headers: n }), U();
|
|
726
735
|
} catch {
|
|
727
736
|
}
|
|
728
737
|
await this.clearTokens();
|
|
729
738
|
}
|
|
730
739
|
async getAccessToken() {
|
|
731
|
-
return localStorage.getItem(
|
|
740
|
+
return localStorage.getItem(m);
|
|
732
741
|
}
|
|
733
742
|
}
|
|
734
|
-
typeof window < "u" && (window.AuthSDK =
|
|
735
|
-
const
|
|
736
|
-
|
|
743
|
+
typeof window < "u" && (window.AuthSDK = C);
|
|
744
|
+
const ae = typeof window < "u" ? window : globalThis;
|
|
745
|
+
ae.AuthSDK = C;
|
|
737
746
|
export {
|
|
738
|
-
|
|
747
|
+
C as AuthSDK,
|
|
739
748
|
re as AuthSDKFetchError,
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
749
|
+
y as arrayBufferToBase64,
|
|
750
|
+
g as arrayBufferToBase64url,
|
|
751
|
+
k as base64ToArrayBuffer,
|
|
752
|
+
M as base64urlToArrayBuffer,
|
|
753
|
+
B as calculateThumbprint,
|
|
754
|
+
U as clearDPoPKey,
|
|
755
|
+
V as clearPasskeyEmail,
|
|
756
|
+
Q as clearPasskeyMobileNumber,
|
|
757
|
+
T as generateDPoPKeyPair,
|
|
758
|
+
w as generateDPoPProof,
|
|
759
|
+
A as getDPoPKey,
|
|
760
|
+
R as getDPoPPublicKeyJWK,
|
|
761
|
+
F as getPasskeyEmail,
|
|
762
|
+
z as getPasskeyMobileNumber,
|
|
763
|
+
j as isConditionalUISupported,
|
|
764
|
+
ee as isDPoPEnabled,
|
|
765
|
+
K as isWebAuthnSupported,
|
|
766
|
+
G as setPasskeyEmail,
|
|
767
|
+
X as setPasskeyMobileNumber,
|
|
768
|
+
te as storeDPoPKey,
|
|
769
|
+
_ as stringToArrayBuffer,
|
|
770
|
+
D as toMinimalJWK,
|
|
771
|
+
W as uint8ArrayToString
|
|
763
772
|
};
|
|
764
773
|
//# sourceMappingURL=postex-auth-sdk-stage.es.js.map
|