mariovalney / laravel-keycloak-web-guard

Simple Keycloak Guard to Laravel Web Routes - https://packagist.org/packages/vizir/laravel-keycloak-web-guard
146 stars 80 forks source link

[Keycloak Error] User cannot be authenticated #103

Closed generationia closed 1 year ago

generationia commented 1 year ago

Hi,

With the example "laravel-keycloak-web-guard-example-master", after enter login and password, I have this error :

Vizir\KeycloakWebGuard\Exceptions\KeycloakCallbackException [Keycloak Error] User cannot be authenticated.

Laravel log content : [2023-06-19 09:17:34] local.ERROR: [Keycloak Service] ID Token already expired. [2023-06-19 09:17:34] local.ERROR: [Keycloak Error] User cannot be authenticated. {"exception":"[object] (Vizir\KeycloakWebGuard\Exceptions\KeycloakCallbackException(code: 0): [Keycloak Error] User cannot be authenticated. at /Users/christophe/Documents/Sources/generation-ia/laravel-keycloak-web-guard-example-master/vendor/vizir/laravel-keycloak-web-guard/src/Auth/Guard/KeycloakWebGuard.php:147)

I tried to logout and logon, but the error was the same

Thanks in advance

generationia commented 1 year ago

Keycloak server and "laravel-keycloak-web-guard-example-master" server dont have the same time.