knpuniversity / oauth2-client-bundle

Easily talk to an OAuth2 server for social functionality in Symfony
https://symfonycasts.com
MIT License
787 stars 146 forks source link

check-sso #442

Open d4rfl0w opened 7 months ago

d4rfl0w commented 7 months ago

How can I use this library to check if any user is logged into keycloak? By using check-sso ?

bocharsky-bw commented 7 months ago

Hey @d4rfl0w ,

When a user log in via an OAuth provider, e.g. Keycloak - you will need to save his ID in your DB so that you could link the user in your DB with the Keycloak user. And so later you will just search for any users in your DB that are using the Keycloak provider because they have an ID set on that field. But before they sign in to your app via the Keycloak Oauth - I'm not sure you can check if any users are using Keycloak.