@shopsbuilder/auth-sdk 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/dist/SaleorAuthClient.js +12 -4
- package/dist/SaleorAuthClient.mjs +1 -1
- package/dist/{chunk-LTHESKMI.mjs → chunk-W2DGQWZK.mjs} +12 -4
- package/dist/index.js +12 -4
- package/dist/index.mjs +1 -1
- package/dist/react/SaleorAuthProvider.mjs +1 -1
- package/dist/react/context.mjs +1 -1
- package/dist/react/index.mjs +1 -1
- package/package.json +1 -1
package/dist/SaleorAuthClient.js
CHANGED
|
@@ -356,10 +356,18 @@ var SaleorAuthClient = class {
|
|
|
356
356
|
this.tokenRefreshPromise = null;
|
|
357
357
|
return this.runAuthorizedRequest(input, requestInit, additionalParams);
|
|
358
358
|
}
|
|
359
|
-
|
|
360
|
-
this.
|
|
361
|
-
|
|
362
|
-
);
|
|
359
|
+
const refreshRequestData = getRequestData(TOKEN_REFRESH, { refreshToken }, {
|
|
360
|
+
...this.defaultRequestInit,
|
|
361
|
+
headers: requestInit?.headers
|
|
362
|
+
});
|
|
363
|
+
console.log("[auth-sdk] Token refresh request:", JSON.stringify({
|
|
364
|
+
url: this.saleorApiUrl,
|
|
365
|
+
method: refreshRequestData.method,
|
|
366
|
+
headers: refreshRequestData.headers,
|
|
367
|
+
bodyLength: refreshRequestData.body?.length,
|
|
368
|
+
bodyPreview: refreshRequestData.body?.slice(0, 200)
|
|
369
|
+
}));
|
|
370
|
+
this.tokenRefreshPromise = fetch(this.saleorApiUrl, refreshRequestData);
|
|
363
371
|
return this.fetchWithAuth(input, requestInit, additionalParams);
|
|
364
372
|
};
|
|
365
373
|
handleSignIn = async (response) => {
|
|
@@ -119,10 +119,18 @@ var SaleorAuthClient = class {
|
|
|
119
119
|
this.tokenRefreshPromise = null;
|
|
120
120
|
return this.runAuthorizedRequest(input, requestInit, additionalParams);
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
);
|
|
122
|
+
const refreshRequestData = getRequestData(TOKEN_REFRESH, { refreshToken }, {
|
|
123
|
+
...this.defaultRequestInit,
|
|
124
|
+
headers: requestInit?.headers
|
|
125
|
+
});
|
|
126
|
+
console.log("[auth-sdk] Token refresh request:", JSON.stringify({
|
|
127
|
+
url: this.saleorApiUrl,
|
|
128
|
+
method: refreshRequestData.method,
|
|
129
|
+
headers: refreshRequestData.headers,
|
|
130
|
+
bodyLength: refreshRequestData.body?.length,
|
|
131
|
+
bodyPreview: refreshRequestData.body?.slice(0, 200)
|
|
132
|
+
}));
|
|
133
|
+
this.tokenRefreshPromise = fetch(this.saleorApiUrl, refreshRequestData);
|
|
126
134
|
return this.fetchWithAuth(input, requestInit, additionalParams);
|
|
127
135
|
};
|
|
128
136
|
handleSignIn = async (response) => {
|
package/dist/index.js
CHANGED
|
@@ -359,10 +359,18 @@ var SaleorAuthClient = class {
|
|
|
359
359
|
this.tokenRefreshPromise = null;
|
|
360
360
|
return this.runAuthorizedRequest(input, requestInit, additionalParams);
|
|
361
361
|
}
|
|
362
|
-
|
|
363
|
-
this.
|
|
364
|
-
|
|
365
|
-
);
|
|
362
|
+
const refreshRequestData = getRequestData(TOKEN_REFRESH, { refreshToken }, {
|
|
363
|
+
...this.defaultRequestInit,
|
|
364
|
+
headers: requestInit?.headers
|
|
365
|
+
});
|
|
366
|
+
console.log("[auth-sdk] Token refresh request:", JSON.stringify({
|
|
367
|
+
url: this.saleorApiUrl,
|
|
368
|
+
method: refreshRequestData.method,
|
|
369
|
+
headers: refreshRequestData.headers,
|
|
370
|
+
bodyLength: refreshRequestData.body?.length,
|
|
371
|
+
bodyPreview: refreshRequestData.body?.slice(0, 200)
|
|
372
|
+
}));
|
|
373
|
+
this.tokenRefreshPromise = fetch(this.saleorApiUrl, refreshRequestData);
|
|
366
374
|
return this.fetchWithAuth(input, requestInit, additionalParams);
|
|
367
375
|
};
|
|
368
376
|
handleSignIn = async (response) => {
|
package/dist/index.mjs
CHANGED
package/dist/react/context.mjs
CHANGED
package/dist/react/index.mjs
CHANGED