From dce52e6524ad62777785edaffa0cc4705f55b876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Baconnier?= Date: Thu, 16 Dec 2021 16:04:42 +0100 Subject: [PATCH] Add invalid_code Zoho error --- config/zoho.php | 1 + src/Auth/ZohoAuthProvider.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/zoho.php b/config/zoho.php index 19d47d2..027234a 100644 --- a/config/zoho.php +++ b/config/zoho.php @@ -12,6 +12,7 @@ // with the error flashed in the session with the key `zoho.access_token_error` // known error code: // - 403: invalid_client_secret + // - 403: invalid_code // - 500: fallback on unknown error 'on_error_url' => '/', diff --git a/src/Auth/ZohoAuthProvider.php b/src/Auth/ZohoAuthProvider.php index a20f5d2..d0d58e8 100644 --- a/src/Auth/ZohoAuthProvider.php +++ b/src/Auth/ZohoAuthProvider.php @@ -105,7 +105,7 @@ protected function checkResponse(ResponseInterface $response, $data): void throw new IdentityProviderException( sprintf('There was an error on response: %s', $data['error']), match ($data['error']) { - 'invalid_client_secret' => 403, + 'invalid_client_secret', 'invalid_code' => 403, default => 500 }, $data['error']