This is a migrated thread and some comments may be shown as answers.

Facebook auth callbacks twice

2 Answers 35 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
JDBPocketware
Top achievements
Rank 2
JDBPocketware asked on 02 May 2014, 11:22 PM
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 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 06 May 2014, 11:22 AM
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.
 
0
JDBPocketware
Top achievements
Rank 2
answered on 06 May 2014, 03:15 PM
It is now working fine. Thanks
Tags
General Discussion
Asked by
JDBPocketware
Top achievements
Rank 2
Answers by
Anton Dobrev
Telerik team
JDBPocketware
Top achievements
Rank 2
Share this question
or