@draftlab/auth 0.1.1 → 0.1.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/core.js CHANGED
@@ -250,8 +250,7 @@ const issuer = (input) => {
250
250
  deleteCookie(ctx, key, { path: input.basePath || "/" });
251
251
  },
252
252
  async invalidate(subject) {
253
- const keys = await Array.fromAsync(Storage.scan(storage, ["oauth:refresh", subject]));
254
- for (const [key] of keys) await Storage.remove(storage, key);
253
+ for await (const [key] of Storage.scan(storage, ["oauth:refresh", subject])) await Storage.remove(storage, key);
255
254
  },
256
255
  storage
257
256
  };
@@ -76,8 +76,7 @@ const UnStorage = ({ driver } = {}) => {
76
76
  const allKeys = await store.getKeys();
77
77
  if (allKeys.length > 0) keys = allKeys.filter((key) => key.startsWith(prefixPath));
78
78
  }
79
- const limitedKeys = keys.slice(0, 1e3);
80
- for (const keyPath of limitedKeys) try {
79
+ for (const keyPath of keys) try {
81
80
  const entry = await store.getItem(keyPath);
82
81
  if (!entry || !entry.value) continue;
83
82
  if (entry.expiry && now >= entry.expiry) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftlab/auth",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Core implementation for @draftlab/auth",
6
6
  "author": "Matheus Pergoli",
@@ -59,7 +59,7 @@
59
59
  "jose": "^6.0.11",
60
60
  "preact": "^10.26.9",
61
61
  "preact-render-to-string": "^6.5.13",
62
- "@draftlab/auth-router": "0.0.2"
62
+ "@draftlab/auth-router": "0.0.4"
63
63
  },
64
64
  "engines": {
65
65
  "node": ">=18"