Facebook auth callbacks twice

3 posts, 0 answers
  1. Jandieg
    Jandieg avatar
    43 posts
    Member since:
    Feb 2012

    Posted 02 May 2014 Link to this post

    On Friends app / scripts / app / login.js

    After login in with FB:

    facebook.getAccessToken(function (token) {
                    alert(token);
    ...
    }


    The callback is invoked 2 times, duplicating all subsequent REST calls (get current user and users). I think it is even authenticating twice in a row and returning 2 different tokens.

    I'm using this model on my app. How to fix it?
  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 06 May 2014 Link to this post

    Hello Jandieg,

    The cause for this behavior is probably that the loadstart event listener should be attached only in the case of an ADFS provider.  This was a known issue before but is already fixed. Could you please verify that the code in scripts/app/ identity-provider.js  is like in here?

    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
  3. Jandieg
    Jandieg avatar
    43 posts
    Member since:
    Feb 2012

    Posted 06 May 2014 in reply to Anton Dobrev Link to this post

    It is now working fine. Thanks
Back to Top