@absolutejs/auth 0.53.2 → 0.53.3
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/cli/migrate.js +2 -9
- package/dist/cli/migrate.js.map +3 -3
- package/dist/htmx/index.js +6 -22
- package/dist/htmx/index.js.map +3 -3
- package/dist/index.js +6 -22
- package/dist/index.js.map +3 -3
- package/dist/manifest.js +14 -3
- package/dist/manifest.js.map +3 -3
- package/dist/manifest.json +18 -18
- package/dist/providers/index.js +6 -22
- package/dist/providers/index.js.map +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2244,10 +2244,7 @@ var getWithingsProps = async (config) => {
|
|
|
2244
2244
|
nonceUrl.searchParams.set("timestamp", timestamp.toString());
|
|
2245
2245
|
nonceUrl.searchParams.set("signature", hashedSignature);
|
|
2246
2246
|
const nonceTarget = nonceUrl.toString();
|
|
2247
|
-
const nonceResponse = await fetch(nonceTarget, {
|
|
2248
|
-
...h2IfHttps(nonceTarget),
|
|
2249
|
-
method: "POST"
|
|
2250
|
-
});
|
|
2247
|
+
const nonceResponse = await fetch(nonceTarget, { method: "POST" });
|
|
2251
2248
|
const nonceData = await nonceResponse.json();
|
|
2252
2249
|
if (nonceData.status === 0) {
|
|
2253
2250
|
return {
|
|
@@ -2257,10 +2254,6 @@ var getWithingsProps = async (config) => {
|
|
|
2257
2254
|
}
|
|
2258
2255
|
return;
|
|
2259
2256
|
};
|
|
2260
|
-
var h2IfHttps = (url) => {
|
|
2261
|
-
const init = url.startsWith("https://") ? { protocol: "http2" } : {};
|
|
2262
|
-
return init;
|
|
2263
|
-
};
|
|
2264
2257
|
var hmacSha256 = async (message, secret) => {
|
|
2265
2258
|
const encoder = new TextEncoder;
|
|
2266
2259
|
const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { hash: "SHA-256", name: "HMAC" }, false, ["sign"]);
|
|
@@ -2631,10 +2624,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2631
2624
|
init.body = encoding === "application/json" ? JSON.stringify(resolvedBody) : new URLSearchParams(resolvedBody).toString();
|
|
2632
2625
|
}
|
|
2633
2626
|
const profileTarget = endpoint.toString();
|
|
2634
|
-
const response = await fetch(profileTarget,
|
|
2635
|
-
...h2IfHttps(profileTarget),
|
|
2636
|
-
...init
|
|
2637
|
-
});
|
|
2627
|
+
const response = await fetch(profileTarget, init);
|
|
2638
2628
|
if (!response.ok)
|
|
2639
2629
|
throw await createOAuth2FetchError(response);
|
|
2640
2630
|
return response.json();
|
|
@@ -2659,9 +2649,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2659
2649
|
encoding,
|
|
2660
2650
|
url: tokenUrl
|
|
2661
2651
|
});
|
|
2662
|
-
const response = await fetch(request
|
|
2663
|
-
...h2IfHttps(request.url)
|
|
2664
|
-
});
|
|
2652
|
+
const response = await fetch(request);
|
|
2665
2653
|
if (!response.ok)
|
|
2666
2654
|
throw await createOAuth2FetchError(response);
|
|
2667
2655
|
return response.json();
|
|
@@ -2715,9 +2703,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2715
2703
|
url: `${endpoint.toString()}?${tokenParamName}=${token}`
|
|
2716
2704
|
});
|
|
2717
2705
|
}
|
|
2718
|
-
const response = await fetch(request
|
|
2719
|
-
...h2IfHttps(request.url)
|
|
2720
|
-
});
|
|
2706
|
+
const response = await fetch(request);
|
|
2721
2707
|
if (!response.ok)
|
|
2722
2708
|
throw await createOAuth2FetchError(response);
|
|
2723
2709
|
},
|
|
@@ -2749,9 +2735,7 @@ var buildOAuth2Client = async (meta, config) => {
|
|
|
2749
2735
|
encoding,
|
|
2750
2736
|
url: tokenUrl
|
|
2751
2737
|
});
|
|
2752
|
-
const response = await fetch(request
|
|
2753
|
-
...h2IfHttps(request.url)
|
|
2754
|
-
});
|
|
2738
|
+
const response = await fetch(request);
|
|
2755
2739
|
if (!response.ok)
|
|
2756
2740
|
throw await createOAuth2FetchError(response);
|
|
2757
2741
|
const tokenResponse = await response.json();
|
|
@@ -28075,5 +28059,5 @@ export {
|
|
|
28075
28059
|
AuthIdentityConflictError
|
|
28076
28060
|
};
|
|
28077
28061
|
|
|
28078
|
-
//# debugId=
|
|
28062
|
+
//# debugId=D6385E0F9EA5534664756E2164756E21
|
|
28079
28063
|
//# sourceMappingURL=index.js.map
|