[keycloak-user] How to use identity provider broker (google and facebook) via ajax/api

Cosmin Ardeleanu cosmin.a at adoreme.com
Tue Jun 11 08:30:12 EDT 2019


Hello,

*Context*: We have a single page application made with Angular JS. We want
to implement login via facebook and google, by using keycloak.

*Requirement*: We want to use ajax/api call, similar to
"../protocol/openid-connect/token" (this end point is using user/pass to
login").

*Problem*: The way the brokering works, is with a series of html redirects:
start -> redirects to keycloak -> redirects to facebook or google -> back
to keycloak -> back to start
This is not compatible with a single page application.

*Question*:
Is there any documentation (or work around) how to achieve login with
facebook/google by using ajax/api calls, similar with the one for
user/password ("../protocol/openid-connect/token" endpoint)?
We need to be able to retrieve the token from facebook and google, and send
it to keycloak, and keycloak should respond with the authentication token.

How can we do it?

Thank you.


More information about the keycloak-user mailing list