We are in the process of adding Keycloak for our microservices authentication method.
What we want to achieve is the client application to use the developer's google credentials and keycloack to authenticate them to use the microservice/rest application.
We have managed so far to enable google authentication to our keycloak site.
The problem we are facing is that we cant find a way to call the keycloak api using the google credentials.
We have been reading the keycloack documentation but it doesnt seem to solve our case.
What you are trying to achive is not possible with Keycloak. You will need to use a Keycloak-specific bearer token to authenticate with the Keycloak REST API.
What you can try in your case is something called a "token exchange". You need to authenticate with google first and get a token from google. This is called an "external token" in Keycloak. Then you may exchange that external token to a Keycloak-specific token (called an "internal token").
Check out the docs for External to Internal token exchange.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With