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

Looping of callback for authenticated user. #25

Closed sumit290785 closed 4 years ago

sumit290785 commented 4 years ago

i faced a problem where user is authenticated on another application via keycloak and when i login to my app it loops into authentication and login and result into error page. As per the debugging done, when i login from my app callback comes with query whereas when my app reach to keycloak when user is already authenticated it send it back with # prepend to query in place of ?. please tell me as it logsout frequently as it doesn't know where to redirect the user if he is already logged in. thank you

mariovalney commented 4 years ago

Hi.

when user is already authenticated it send it back with # prepend to query in place of ?.

Would you please provide this URL?

please tell me as it logsout frequently as it doesn't know where to redirect the user if he is already logged in.

I'm sorry. I wasn't able to understand.

--

I'll try to reproduce here. When you say another application is another client?

sumit290785 commented 4 years ago

Have two apps using same client. When logging to one app and try to log I nto other then second app start looping between callback and login

mariovalney commented 4 years ago

Hi. I guess i figured out your problem:

Each app should have a "client" from keycloak. If you keep the same client for two apps, one will "stole" session from another.

mariovalney commented 4 years ago

Hi. Is it solved?