From 6272cdf8dc86e3ce79e76d65e98ff4fa8ef74304 Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Mon, 13 Jan 2025 16:57:41 -0800 Subject: [PATCH] Fix STACK-BACKEND-69 --- apps/backend/src/oauth/providers/base.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/backend/src/oauth/providers/base.tsx b/apps/backend/src/oauth/providers/base.tsx index 379ad4a21..2731c829e 100644 --- a/apps/backend/src/oauth/providers/base.tsx +++ b/apps/backend/src/oauth/providers/base.tsx @@ -159,6 +159,9 @@ export abstract class OAuthBaseProvider { if (error?.error === 'access_denied') { throw new KnownErrors.OAuthProviderAccessDenied(); } + if (error?.error === 'invalid_client') { + throw new StatusError(400, `Invalid client credentials for this OAuth provider. Please ensure the configuration in the Stack Auth dashboard is correct.`); + } throw new StackAssertionError(`Inner OAuth callback failed due to error: ${error}`, { params, cause: error }); }