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?
GET User's detail REST API detect which identity provider's user.
Get representation of the 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.
Detail instruction here
#2 Get user list
GET http://localhost:8080/auth/admin/realms/my-realm/users
#3 Get google user
GET http://localhost:8080/auth/admin/realms/my-realm/users/{google-user-uuid}
#4 Get regular user
GET http://localhost:8080/auth/admin/realms/my-realm/users/{user-uuid}