@absolutejs/auth 0.76.1 → 0.76.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/server.js CHANGED
@@ -5832,14 +5832,15 @@ var base64Url2 = (value) => {
5832
5832
  };
5833
5833
  var deriveAuthSyncNamespace = async ({
5834
5834
  clientId,
5835
+ digestSha256 = async (value) => new Uint8Array(await crypto.subtle.digest("SHA-256", new Uint8Array(value))),
5835
5836
  issuer,
5836
5837
  partition,
5837
5838
  subject
5838
5839
  }) => {
5839
5840
  if (clientId.length === 0 || issuer.length === 0 || subject.length === 0)
5840
5841
  throw new TypeError("Auth Sync namespace requires issuer, clientId, and subject.");
5841
- const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify([issuer, clientId, subject, partition ?? null])));
5842
- return `auth:v1:${base64Url2(new Uint8Array(digest))}`;
5842
+ const digest = await digestSha256(new TextEncoder().encode(JSON.stringify([issuer, clientId, subject, partition ?? null])));
5843
+ return `auth:v1:${base64Url2(digest)}`;
5843
5844
  };
5844
5845
  var readAuthSyncPartition = (user) => {
5845
5846
  if (typeof user !== "object" || user === null)
@@ -42066,5 +42067,5 @@ export {
42066
42067
  userSessionIdTypebox
42067
42068
  };
42068
42069
 
42069
- //# debugId=EBB1CE453260D04564756E2164756E21
42070
+ //# debugId=72D41A7F86EE7EF364756E2164756E21
42070
42071
  //# sourceMappingURL=server.js.map