diff options
Diffstat (limited to 'apps/web/lib')
| -rw-r--r-- | apps/web/lib/api-auth.ts | 2 | ||||
| -rw-r--r-- | apps/web/lib/api-key.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/web/lib/api-auth.ts b/apps/web/lib/api-auth.ts index 3f819f2..d2efdd7 100644 --- a/apps/web/lib/api-auth.ts +++ b/apps/web/lib/api-auth.ts @@ -25,7 +25,7 @@ export async function authenticateApiRequest( const apiKey = authorizationHeader.slice(7) - if (!apiKey.startsWith("asn_")) { + if (!apiKey.startsWith("asa_")) { return { authenticated: false, status: 401, error: "invalid api key format" } } diff --git a/apps/web/lib/api-key.ts b/apps/web/lib/api-key.ts index ce59f89..f5beaac 100644 --- a/apps/web/lib/api-key.ts +++ b/apps/web/lib/api-key.ts @@ -1,6 +1,6 @@ import { randomBytes, createHash } from "crypto" -const API_KEY_PREFIX = "asn_" +const API_KEY_PREFIX = "asa_" export function generateApiKey(): { fullKey: string |