robsontenorio / laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel
MIT License
434 stars 141 forks source link

500 Error if the token expired. #104

Closed info170 closed 9 months ago

info170 commented 9 months ago

If access token expires I got the error: KeycloakGuard\Exceptions\TokenException: [Keycloak Guard] Expired token in file /var/www/html/vendor/robsontenorio/laravel-keycloak-guard/src/KeycloakGuard.php on line 42

As I think, it should recall new access_token using refresh_token ?

robsontenorio commented 9 months ago

If anyone send an expired token and this package simple issue a new fresh it would be a security issue.

By design It is client responsibility to manage token expirations.