Skip to content

Commit

Permalink
Merge pull request #10 from firevel/feature/dont-debug-expired-tokens
Browse files Browse the repository at this point in the history
Dont throw exception on expired token
  • Loading branch information
sl0wik authored Jan 21, 2021
2 parents 35bcd09 + 747f743 commit b957568
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FirebaseGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function user(Request $request)
->setFirebaseAuthenticationToken($token)
->resolveByClaims($firebaseToken->getClaims());
} catch (\Exception $e) {
if ($e instanceof \Firebase\Auth\Token\Exception\ExpiredToken) {
return;
}

if (config('app.debug')) {
throw $e;
}
Expand Down

0 comments on commit b957568

Please sign in to comment.