We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a397902 commit bbe810aCopy full SHA for bbe810a
apps/webapp/app/services/apiAuth.server.ts
@@ -71,11 +71,14 @@ export async function authenticateApiRequest(
71
export async function authenticateApiRequestWithFailure(
72
request: Request,
73
options: { allowPublicKey?: boolean; allowJWT?: boolean } = {}
74
-): Promise<ApiAuthenticationResult | undefined> {
+): Promise<ApiAuthenticationResult> {
75
const apiKey = getApiKeyFromRequest(request);
76
77
if (!apiKey) {
78
- return;
+ return {
79
+ ok: false,
80
+ error: "Invalid API Key",
81
+ };
82
}
83
84
const authentication = await authenticateApiKeyWithFailure(apiKey, options);
0 commit comments