@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.cjs
CHANGED
|
@@ -438,6 +438,7 @@ async function beginPasskeyAuthentication(username) {
|
|
|
438
438
|
{
|
|
439
439
|
method: "POST",
|
|
440
440
|
headers: { "Content-Type": "application/json" },
|
|
441
|
+
credentials: "include",
|
|
441
442
|
body: JSON.stringify({ username })
|
|
442
443
|
}
|
|
443
444
|
);
|
|
@@ -481,6 +482,7 @@ async function completePasskeyAuthentication(challengeId, credential, options) {
|
|
|
481
482
|
{
|
|
482
483
|
method: "POST",
|
|
483
484
|
headers: { "Content-Type": "application/json" },
|
|
485
|
+
credentials: "include",
|
|
484
486
|
body: JSON.stringify({ challengeId, credential: credentialData })
|
|
485
487
|
}
|
|
486
488
|
);
|
|
@@ -510,6 +512,7 @@ async function beginPasskeyRegistration(username) {
|
|
|
510
512
|
{
|
|
511
513
|
method: "POST",
|
|
512
514
|
headers: { "Content-Type": "application/json" },
|
|
515
|
+
credentials: "include",
|
|
513
516
|
body: JSON.stringify({ username })
|
|
514
517
|
}
|
|
515
518
|
);
|
|
@@ -553,6 +556,7 @@ async function completePasskeyRegistration(challengeId, credential, options) {
|
|
|
553
556
|
{
|
|
554
557
|
method: "POST",
|
|
555
558
|
headers: { "Content-Type": "application/json" },
|
|
559
|
+
credentials: "include",
|
|
556
560
|
body: JSON.stringify({ challengeId, credential: credentialData })
|
|
557
561
|
}
|
|
558
562
|
);
|
|
@@ -925,7 +929,9 @@ var init_httpClient = __esm({
|
|
|
925
929
|
}
|
|
926
930
|
const requestConfig = {
|
|
927
931
|
method,
|
|
928
|
-
headers: requestHeaders
|
|
932
|
+
headers: requestHeaders,
|
|
933
|
+
credentials: "include"
|
|
934
|
+
// Enable cookies for cross-origin requests
|
|
929
935
|
};
|
|
930
936
|
if (body && method !== "GET") {
|
|
931
937
|
requestConfig.body = typeof body === "string" ? body : JSON.stringify(body);
|
|
@@ -1186,7 +1192,8 @@ var init_cloudStorage = __esm({
|
|
|
1186
1192
|
const searchResponse = await fetch(
|
|
1187
1193
|
`https://www.googleapis.com/drive/v3/files?q=name='${folderName}' and mimeType='application/vnd.google-apps.folder' and trashed=false`,
|
|
1188
1194
|
{
|
|
1189
|
-
headers: { Authorization: `Bearer ${this.accessToken}` }
|
|
1195
|
+
headers: { Authorization: `Bearer ${this.accessToken}` },
|
|
1196
|
+
credentials: "include"
|
|
1190
1197
|
}
|
|
1191
1198
|
);
|
|
1192
1199
|
if (!searchResponse.ok) {
|
|
@@ -1202,6 +1209,7 @@ var init_cloudStorage = __esm({
|
|
|
1202
1209
|
Authorization: `Bearer ${this.accessToken}`,
|
|
1203
1210
|
"Content-Type": "application/json"
|
|
1204
1211
|
},
|
|
1212
|
+
credentials: "include",
|
|
1205
1213
|
body: JSON.stringify({
|
|
1206
1214
|
name: folderName,
|
|
1207
1215
|
mimeType: "application/vnd.google-apps.folder"
|
|
@@ -1224,6 +1232,7 @@ var init_cloudStorage = __esm({
|
|
|
1224
1232
|
headers: {
|
|
1225
1233
|
Authorization: `Bearer ${this.accessToken}`
|
|
1226
1234
|
},
|
|
1235
|
+
credentials: "include",
|
|
1227
1236
|
body: form
|
|
1228
1237
|
}
|
|
1229
1238
|
);
|
|
@@ -4367,6 +4376,7 @@ var init_AuthModal = __esm({
|
|
|
4367
4376
|
headers: {
|
|
4368
4377
|
"Content-Type": "application/json"
|
|
4369
4378
|
},
|
|
4379
|
+
credentials: "include",
|
|
4370
4380
|
body: JSON.stringify({
|
|
4371
4381
|
email,
|
|
4372
4382
|
purpose: "login"
|
|
@@ -4484,6 +4494,7 @@ var init_AuthModal = __esm({
|
|
|
4484
4494
|
headers: {
|
|
4485
4495
|
"Content-Type": "application/json"
|
|
4486
4496
|
},
|
|
4497
|
+
credentials: "include",
|
|
4487
4498
|
body: JSON.stringify({
|
|
4488
4499
|
email,
|
|
4489
4500
|
purpose: "login"
|
|
@@ -7250,7 +7261,7 @@ var TransactionsModal = ({ open, onOpenChange, onBack }) => {
|
|
|
7250
7261
|
const explorerUrl = getExplorerUrl();
|
|
7251
7262
|
const baseUrl = explorerUrl.replace(/\/$/, "");
|
|
7252
7263
|
const apiUrl = `${baseUrl}/api/v2/addresses/${address}/transactions?items_count=20`;
|
|
7253
|
-
const response = await fetch(apiUrl);
|
|
7264
|
+
const response = await fetch(apiUrl, { credentials: "include" });
|
|
7254
7265
|
if (!response.ok) {
|
|
7255
7266
|
throw new Error(`Failed to fetch transactions: ${response.status}`);
|
|
7256
7267
|
}
|
|
@@ -7897,6 +7908,7 @@ var UserOpStatus = ({
|
|
|
7897
7908
|
const res = await fetch(getBundlerUrl(), {
|
|
7898
7909
|
method: "POST",
|
|
7899
7910
|
headers: { "content-type": "application/json" },
|
|
7911
|
+
credentials: "include",
|
|
7900
7912
|
body: JSON.stringify(body)
|
|
7901
7913
|
});
|
|
7902
7914
|
const json = await res.json();
|
|
@@ -8662,7 +8674,7 @@ function useLumiaPassportLinkedProfiles() {
|
|
|
8662
8674
|
// package.json
|
|
8663
8675
|
var package_default = {
|
|
8664
8676
|
name: "@lumiapassport/ui-kit",
|
|
8665
|
-
version: "1.
|
|
8677
|
+
version: "1.8.1",
|
|
8666
8678
|
description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
|
|
8667
8679
|
type: "module",
|
|
8668
8680
|
main: "./dist/index.cjs",
|
|
@@ -9780,7 +9792,7 @@ var TransactionsList = ({
|
|
|
9780
9792
|
const baseUrl = explorerUrl.replace(/\/$/, "");
|
|
9781
9793
|
const apiUrl = `${baseUrl}/api/v2/addresses/${address}/transactions?items_count=${itemsCount}`;
|
|
9782
9794
|
console.log("[TransactionsList] Fetching from:", apiUrl);
|
|
9783
|
-
const response = await fetch(apiUrl);
|
|
9795
|
+
const response = await fetch(apiUrl, { credentials: "include" });
|
|
9784
9796
|
if (!response.ok) {
|
|
9785
9797
|
throw new Error(`Failed to fetch transactions: ${response.status}`);
|
|
9786
9798
|
}
|
|
@@ -9924,6 +9936,7 @@ function useUserOpStatus(options = {}) {
|
|
|
9924
9936
|
const res = await fetch(getBundlerUrl(), {
|
|
9925
9937
|
method: "POST",
|
|
9926
9938
|
headers: { "content-type": "application/json" },
|
|
9939
|
+
credentials: "include",
|
|
9927
9940
|
body: JSON.stringify(body)
|
|
9928
9941
|
});
|
|
9929
9942
|
const json = await res.json();
|