]> BookStack Code Mirror - bookstack/commitdiff
Generalize refresh failure handling
authorJasper Weyne <redacted>
Wed, 8 Jul 2020 15:02:52 +0000 (17:02 +0200)
committerJasper Weyne <redacted>
Wed, 8 Jul 2020 15:02:52 +0000 (17:02 +0200)
app/Auth/Access/OpenIdService.php

index 7b651c3ded32f3700fe0fdabaf5df76360651124..14b6ac9a5d4632ca321493a5d10fd68702b3ec5d 100644 (file)
@@ -88,9 +88,10 @@ class OpenIdService extends ExternalAuthService
             // Refreshing failed, logout
             $this->actionLogout();
             return false;
-        } catch (InvalidTokenException $e) {
-            // A refresh token doesn't necessarily contain
-            // an ID token, ignore this exception
+        } catch (\Exception $e) {
+            // Unknown error, logout and throw
+            $this->actionLogout();
+            throw $e;
         }
 
         // A valid token was obtained, we update the access token