[keycloak-user] Social Login Fails

Sebastien Blanc sblanc at redhat.com
Fri Dec 2 02:09:00 EST 2016


Is there any stacktrace in the server log ?
You could also switch on the events in the admin console, they might give
you more info about the failure.



On Thu, Dec 1, 2016 at 7:23 PM, Srikar Nuvvula <nsrikar at yahoo.com> wrote:

> Hi,
> I am new to using keycloak.  I am trying to get social login work with my
> angularjs app but I am having issues that I can't see to get over. Here are
> steps I followed but login failed.
> 1. Setup facebook auth provider in keycloak2. Created client id with
> public type in keyclock3. Setup an app in facebook and populated redirect
> url which is (http://localhost:8080/auth/realms/faceauth/broker/
> facebook/endpoint)4. Extracted clientid and secrect from facebook app and
> populated it on facebook id provider in keycloak 5. Using keycloack js
> adapter I invoked the login call (uses the following code)
> ***************************************************************************//
> on every request, authenticate user firstangular.element(document).ready(()
> => { window._keycloak = window._keycloak = Keycloak('keycloak/keycloak.json');//new
> Keycloak({ url: 'http://localhost:8080/auth', realm: 'faceauth',
> clientId: 'facedemo' }); window._keycloak.init({  onLoad: 'login-required'
> }) .success((authenticated) => {  if(authenticated) {   window._keycloak.
> loadUserProfile().success(function(profile){
> angular.bootstrap(document, ['keycloak-tutorial']); // manually bootstrap
> Angular   });  }  else {   window.location.reload();  } }) .error(function
> () {  alert("auth failed")  //window.location.reload();
> });});********************************************************************************6.
> I am presented facebook login when I key in the details and login the
> control comes back to my app on localhost but goes into error block and
> displays "auth failed" message.
> I don't know what's happening.  I don't have any more error information to
> debug.  What's the best way to understand what's going on?  Please help.
> Thanks much
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


More information about the keycloak-user mailing list