@lumiapassport/ui-kit 1.7.0 → 1.8.1
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 +29 -10
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/main.js +11 -4
- package/dist/iframe/main.js.map +1 -1
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -429,6 +429,7 @@ async function beginPasskeyAuthentication(username) {
|
|
|
429
429
|
{
|
|
430
430
|
method: "POST",
|
|
431
431
|
headers: { "Content-Type": "application/json" },
|
|
432
|
+
credentials: "include",
|
|
432
433
|
body: JSON.stringify({ username })
|
|
433
434
|
}
|
|
434
435
|
);
|
|
@@ -472,6 +473,7 @@ async function completePasskeyAuthentication(challengeId, credential, options) {
|
|
|
472
473
|
{
|
|
473
474
|
method: "POST",
|
|
474
475
|
headers: { "Content-Type": "application/json" },
|
|
476
|
+
credentials: "include",
|
|
475
477
|
body: JSON.stringify({ challengeId, credential: credentialData })
|
|
476
478
|
}
|
|
477
479
|
);
|
|
@@ -501,6 +503,7 @@ async function beginPasskeyRegistration(username) {
|
|
|
501
503
|
{
|
|
502
504
|
method: "POST",
|
|
503
505
|
headers: { "Content-Type": "application/json" },
|
|
506
|
+
credentials: "include",
|
|
504
507
|
body: JSON.stringify({ username })
|
|
505
508
|
}
|
|
506
509
|
);
|
|
@@ -544,6 +547,7 @@ async function completePasskeyRegistration(challengeId, credential, options) {
|
|
|
544
547
|
{
|
|
545
548
|
method: "POST",
|
|
546
549
|
headers: { "Content-Type": "application/json" },
|
|
550
|
+
credentials: "include",
|
|
547
551
|
body: JSON.stringify({ challengeId, credential: credentialData })
|
|
548
552
|
}
|
|
549
553
|
);
|
|
@@ -913,7 +917,9 @@ var init_httpClient = __esm({
|
|
|
913
917
|
}
|
|
914
918
|
const requestConfig = {
|
|
915
919
|
method,
|
|
916
|
-
headers: requestHeaders
|
|
920
|
+
headers: requestHeaders,
|
|
921
|
+
credentials: "include"
|
|
922
|
+
// Enable cookies for cross-origin requests
|
|
917
923
|
};
|
|
918
924
|
if (body && method !== "GET") {
|
|
919
925
|
requestConfig.body = typeof body === "string" ? body : JSON.stringify(body);
|
|
@@ -1174,7 +1180,8 @@ var init_cloudStorage = __esm({
|
|
|
1174
1180
|
const searchResponse = await fetch(
|
|
1175
1181
|
`https://www.googleapis.com/drive/v3/files?q=name='${folderName}' and mimeType='application/vnd.google-apps.folder' and trashed=false`,
|
|
1176
1182
|
{
|
|
1177
|
-
headers: { Authorization: `Bearer ${this.accessToken}` }
|
|
1183
|
+
headers: { Authorization: `Bearer ${this.accessToken}` },
|
|
1184
|
+
credentials: "include"
|
|
1178
1185
|
}
|
|
1179
1186
|
);
|
|
1180
1187
|
if (!searchResponse.ok) {
|
|
@@ -1190,6 +1197,7 @@ var init_cloudStorage = __esm({
|
|
|
1190
1197
|
Authorization: `Bearer ${this.accessToken}`,
|
|
1191
1198
|
"Content-Type": "application/json"
|
|
1192
1199
|
},
|
|
1200
|
+
credentials: "include",
|
|
1193
1201
|
body: JSON.stringify({
|
|
1194
1202
|
name: folderName,
|
|
1195
1203
|
mimeType: "application/vnd.google-apps.folder"
|
|
@@ -1212,6 +1220,7 @@ var init_cloudStorage = __esm({
|
|
|
1212
1220
|
headers: {
|
|
1213
1221
|
Authorization: `Bearer ${this.accessToken}`
|
|
1214
1222
|
},
|
|
1223
|
+
credentials: "include",
|
|
1215
1224
|
body: form
|
|
1216
1225
|
}
|
|
1217
1226
|
);
|
|
@@ -4365,6 +4374,7 @@ var init_AuthModal = __esm({
|
|
|
4365
4374
|
headers: {
|
|
4366
4375
|
"Content-Type": "application/json"
|
|
4367
4376
|
},
|
|
4377
|
+
credentials: "include",
|
|
4368
4378
|
body: JSON.stringify({
|
|
4369
4379
|
email,
|
|
4370
4380
|
purpose: "login"
|
|
@@ -4482,6 +4492,7 @@ var init_AuthModal = __esm({
|
|
|
4482
4492
|
headers: {
|
|
4483
4493
|
"Content-Type": "application/json"
|
|
4484
4494
|
},
|
|
4495
|
+
credentials: "include",
|
|
4485
4496
|
body: JSON.stringify({
|
|
4486
4497
|
email,
|
|
4487
4498
|
purpose: "login"
|
|
@@ -7221,7 +7232,7 @@ var TransactionsModal = ({ open, onOpenChange, onBack }) => {
|
|
|
7221
7232
|
const explorerUrl = getExplorerUrl();
|
|
7222
7233
|
const baseUrl = explorerUrl.replace(/\/$/, "");
|
|
7223
7234
|
const apiUrl = `${baseUrl}/api/v2/addresses/${address}/transactions?items_count=20`;
|
|
7224
|
-
const response = await fetch(apiUrl);
|
|
7235
|
+
const response = await fetch(apiUrl, { credentials: "include" });
|
|
7225
7236
|
if (!response.ok) {
|
|
7226
7237
|
throw new Error(`Failed to fetch transactions: ${response.status}`);
|
|
7227
7238
|
}
|
|
@@ -7868,6 +7879,7 @@ var UserOpStatus = ({
|
|
|
7868
7879
|
const res = await fetch(getBundlerUrl(), {
|
|
7869
7880
|
method: "POST",
|
|
7870
7881
|
headers: { "content-type": "application/json" },
|
|
7882
|
+
credentials: "include",
|
|
7871
7883
|
body: JSON.stringify(body)
|
|
7872
7884
|
});
|
|
7873
7885
|
const json = await res.json();
|
|
@@ -8633,7 +8645,7 @@ function useLumiaPassportLinkedProfiles() {
|
|
|
8633
8645
|
// package.json
|
|
8634
8646
|
var package_default = {
|
|
8635
8647
|
name: "@lumiapassport/ui-kit",
|
|
8636
|
-
version: "1.
|
|
8648
|
+
version: "1.8.1",
|
|
8637
8649
|
description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
|
|
8638
8650
|
type: "module",
|
|
8639
8651
|
main: "./dist/index.cjs",
|
|
@@ -9751,7 +9763,7 @@ var TransactionsList = ({
|
|
|
9751
9763
|
const baseUrl = explorerUrl.replace(/\/$/, "");
|
|
9752
9764
|
const apiUrl = `${baseUrl}/api/v2/addresses/${address}/transactions?items_count=${itemsCount}`;
|
|
9753
9765
|
console.log("[TransactionsList] Fetching from:", apiUrl);
|
|
9754
|
-
const response = await fetch(apiUrl);
|
|
9766
|
+
const response = await fetch(apiUrl, { credentials: "include" });
|
|
9755
9767
|
if (!response.ok) {
|
|
9756
9768
|
throw new Error(`Failed to fetch transactions: ${response.status}`);
|
|
9757
9769
|
}
|
|
@@ -9895,6 +9907,7 @@ function useUserOpStatus(options = {}) {
|
|
|
9895
9907
|
const res = await fetch(getBundlerUrl(), {
|
|
9896
9908
|
method: "POST",
|
|
9897
9909
|
headers: { "content-type": "application/json" },
|
|
9910
|
+
credentials: "include",
|
|
9898
9911
|
body: JSON.stringify(body)
|
|
9899
9912
|
});
|
|
9900
9913
|
const json = await res.json();
|