@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.
@@ -2109,10 +2109,7 @@ var getWithingsProps = async (config) => {
2109
2109
  nonceUrl.searchParams.set("timestamp", timestamp.toString());
2110
2110
  nonceUrl.searchParams.set("signature", hashedSignature);
2111
2111
  const nonceTarget = nonceUrl.toString();
2112
- const nonceResponse = await fetch(nonceTarget, {
2113
- ...h2IfHttps(nonceTarget),
2114
- method: "POST"
2115
- });
2112
+ const nonceResponse = await fetch(nonceTarget, { method: "POST" });
2116
2113
  const nonceData = await nonceResponse.json();
2117
2114
  if (nonceData.status === 0) {
2118
2115
  return {
@@ -2122,10 +2119,6 @@ var getWithingsProps = async (config) => {
2122
2119
  }
2123
2120
  return;
2124
2121
  };
2125
- var h2IfHttps = (url) => {
2126
- const init = url.startsWith("https://") ? { protocol: "http2" } : {};
2127
- return init;
2128
- };
2129
2122
  var hmacSha256 = async (message, secret) => {
2130
2123
  const encoder = new TextEncoder;
2131
2124
  const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { hash: "SHA-256", name: "HMAC" }, false, ["sign"]);
@@ -2496,10 +2489,7 @@ var buildOAuth2Client = async (meta, config) => {
2496
2489
  init.body = encoding === "application/json" ? JSON.stringify(resolvedBody) : new URLSearchParams(resolvedBody).toString();
2497
2490
  }
2498
2491
  const profileTarget = endpoint.toString();
2499
- const response = await fetch(profileTarget, {
2500
- ...h2IfHttps(profileTarget),
2501
- ...init
2502
- });
2492
+ const response = await fetch(profileTarget, init);
2503
2493
  if (!response.ok)
2504
2494
  throw await createOAuth2FetchError(response);
2505
2495
  return response.json();
@@ -2524,9 +2514,7 @@ var buildOAuth2Client = async (meta, config) => {
2524
2514
  encoding,
2525
2515
  url: tokenUrl
2526
2516
  });
2527
- const response = await fetch(request, {
2528
- ...h2IfHttps(request.url)
2529
- });
2517
+ const response = await fetch(request);
2530
2518
  if (!response.ok)
2531
2519
  throw await createOAuth2FetchError(response);
2532
2520
  return response.json();
@@ -2580,9 +2568,7 @@ var buildOAuth2Client = async (meta, config) => {
2580
2568
  url: `${endpoint.toString()}?${tokenParamName}=${token}`
2581
2569
  });
2582
2570
  }
2583
- const response = await fetch(request, {
2584
- ...h2IfHttps(request.url)
2585
- });
2571
+ const response = await fetch(request);
2586
2572
  if (!response.ok)
2587
2573
  throw await createOAuth2FetchError(response);
2588
2574
  },
@@ -2614,9 +2600,7 @@ var buildOAuth2Client = async (meta, config) => {
2614
2600
  encoding,
2615
2601
  url: tokenUrl
2616
2602
  });
2617
- const response = await fetch(request, {
2618
- ...h2IfHttps(request.url)
2619
- });
2603
+ const response = await fetch(request);
2620
2604
  if (!response.ok)
2621
2605
  throw await createOAuth2FetchError(response);
2622
2606
  const tokenResponse = await response.json();
@@ -2716,5 +2700,5 @@ export {
2716
2700
  escapeHtml
2717
2701
  };
2718
2702
 
2719
- //# debugId=2CB3119B4750600064756E2164756E21
2703
+ //# debugId=5B08A72785E8D12364756E2164756E21
2720
2704
  //# sourceMappingURL=index.js.map