Skip to content

Commit 13ec8ff

Browse files
authored
Merge pull request #728 from durunvo/master
remove assign authResponse in FB.init
2 parents 6708261 + d15def9 commit 13ec8ff

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/FacebookUtils.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @flow-weak
1010
*/
1111
/* global FB */
12-
import parseDate from './parseDate';
1312
import ParseUser from './ParseUser';
1413

1514
let initialized = false;
@@ -42,24 +41,12 @@ const provider = {
4241

4342
restoreAuthentication(authData) {
4443
if (authData) {
45-
const expiration = parseDate(authData.expiration_date);
46-
const expiresIn = expiration ?
47-
(expiration.getTime() - new Date().getTime()) / 1000 :
48-
0;
49-
50-
const authResponse = {
51-
userID: authData.id,
52-
accessToken: authData.access_token,
53-
expiresIn: expiresIn
54-
};
5544
const newOptions = {};
5645
if (initOptions) {
5746
for (const key in initOptions) {
5847
newOptions[key] = initOptions[key];
5948
}
6049
}
61-
newOptions.authResponse = authResponse;
62-
6350
// Suppress checks for login status from the browser.
6451
newOptions.status = false;
6552

@@ -69,7 +56,7 @@ const provider = {
6956
// from a Parse User that logged in with username/password.
7057
const existingResponse = FB.getAuthResponse();
7158
if (existingResponse &&
72-
existingResponse.userID !== authResponse.userID) {
59+
existingResponse.userID !== authData.id) {
7360
FB.logout();
7461
}
7562

0 commit comments

Comments
 (0)