Fix STACK-BACKEND-69

This commit is contained in:
Konstantin Wohlwend 2025-01-13 16:57:41 -08:00
parent 3cd66c4c58
commit 6272cdf8dc

View File

@ -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 });
}