MCPcopy Create free account
hub / github.com/freecodexyz/free-code / isValidApiKey

Function isValidApiKey

src/utils/auth.ts:1090–1093  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

1088)
1089
1090function isValidApiKey(apiKey: string): boolean {
1091 // Only allow alphanumeric characters, dashes, and underscores
1092 return /^[a-zA-Z0-9-_]+$/.test(apiKey)
1093}
1094
1095export async function saveApiKey(apiKey: string): Promise<void> {
1096 if (!isValidApiKey(apiKey)) {

Callers 1

saveApiKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected