I am integrating Keycloak into a React Application. I have successfully added Google Providers in Keycloak. Now the user can either log in with Keycloak user's credentials or from Login with Google. After login how to distinguish if a user is with React or with a Provider? And how to acquire the ID of that user so for certain activities to store that ID in the database?
CodePudding user response:
GET User's detail REST API detect which identity provider's user.
The federatedIdentities
fields shows it
Demo this user login via google
You needs a master token in Posman.
#1 Get master token at Posman.
#4 Get regular user
GET http://localhost:8080/auth/admin/realms/my-realm/users/{user-uuid}