@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
@@ -1,4 +1,4 @@
1
- import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-Cn2i9Ywe.mjs";
1
+ import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-CwRZx9_C.mjs";
2
2
  //#region src/client.ts
3
3
  const apiKeyClient = () => {
4
4
  return {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as API_KEY_ERROR_CODES, t as PACKAGE_VERSION } from "./version-Cn2i9Ywe.mjs";
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("UNAUTHORIZED", {
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 }
@@ -35,6 +35,6 @@ const API_KEY_ERROR_CODES = defineErrorCodes({
35
35
  });
36
36
  //#endregion
37
37
  //#region src/version.ts
38
- const PACKAGE_VERSION = "1.6.10";
38
+ const PACKAGE_VERSION = "1.6.11";
39
39
  //#endregion
40
40
  export { API_KEY_ERROR_CODES as n, PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/api-key",
3
- "version": "1.6.10",
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.10",
65
- "better-auth": "1.6.10"
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.10",
70
- "better-auth": "^1.6.10"
69
+ "@better-auth/core": "^1.6.11",
70
+ "better-auth": "^1.6.11"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "tsdown",