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

Problem with Auth user #43

Closed homeoftheunits closed 3 years ago

homeoftheunits commented 3 years ago

Hey guys,

the middleware redirect to often to login.

I debug this, and in the Guard the setUser() sets the user, but the user is null in the KeycloakAuthenticated Middleware. Thats why the middleware redirects to /login, Keycloak says, user is logged, and so on. Until the Browser breaks with to many redirects.

Something should wrong in the Guard, and it's look like, that the user from keycloak doesn't attempt to Auth?

Answer from @mariovalney in https://github.com/Vizir/laravel-keycloak-web-guard/issues/42#issuecomment-770458570 How can i check the session? When i look in the session folder there are 16 session files for on process.

Cheers Ralf

homeoftheunits commented 3 years ago

@mariovalney I see the accessToken in a session file. So it can't be an session Problem, right?

mariovalney commented 3 years ago

Hey. Because #44 I guess it's already OK?

homeoftheunits commented 3 years ago

Yes :)