@better-auth/api-key 1.6.10 → 1.6.11
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/client.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-CwRZx9_C.mjs";
|
|
2
2
|
import { createAuthEndpoint, createAuthMiddleware } from "@better-auth/core/api";
|
|
3
3
|
import { base64Url } from "@better-auth/utils/base64";
|
|
4
4
|
import { createHash } from "@better-auth/utils/hash";
|
|
@@ -1712,7 +1712,7 @@ async function validateApiKey({ hashedKey, ctx, opts, schema, permissions }) {
|
|
|
1712
1712
|
else remaining--;
|
|
1713
1713
|
}
|
|
1714
1714
|
const { message, success, update, tryAgainIn } = isRateLimited(apiKey, opts);
|
|
1715
|
-
if (success === false) throw new APIError$1("
|
|
1715
|
+
if (success === false) throw new APIError$1("TOO_MANY_REQUESTS", {
|
|
1716
1716
|
message: message ?? void 0,
|
|
1717
1717
|
code: "RATE_LIMITED",
|
|
1718
1718
|
details: { tryAgainIn }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/api-key",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.11",
|
|
4
4
|
"description": "API Key plugin for Better Auth.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"tsdown": "0.21.1",
|
|
64
|
-
"@better-auth/core": "1.6.
|
|
65
|
-
"better-auth": "1.6.
|
|
64
|
+
"@better-auth/core": "1.6.11",
|
|
65
|
+
"better-auth": "1.6.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@better-auth/utils": "0.4.0",
|
|
69
|
-
"@better-auth/core": "^1.6.
|
|
70
|
-
"better-auth": "^1.6.
|
|
69
|
+
"@better-auth/core": "^1.6.11",
|
|
70
|
+
"better-auth": "^1.6.11"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsdown",
|