File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 9
9
* @flow -weak
10
10
*/
11
11
/* global FB */
12
- import parseDate from './parseDate' ;
13
12
import ParseUser from './ParseUser' ;
14
13
15
14
let initialized = false ;
@@ -42,24 +41,12 @@ const provider = {
42
41
43
42
restoreAuthentication ( authData ) {
44
43
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
- } ;
55
44
const newOptions = { } ;
56
45
if ( initOptions ) {
57
46
for ( const key in initOptions ) {
58
47
newOptions [ key ] = initOptions [ key ] ;
59
48
}
60
49
}
61
- newOptions . authResponse = authResponse ;
62
-
63
50
// Suppress checks for login status from the browser.
64
51
newOptions . status = false ;
65
52
@@ -69,7 +56,7 @@ const provider = {
69
56
// from a Parse User that logged in with username/password.
70
57
const existingResponse = FB . getAuthResponse ( ) ;
71
58
if ( existingResponse &&
72
- existingResponse . userID !== authResponse . userID ) {
59
+ existingResponse . userID !== authData . id ) {
73
60
FB . logout ( ) ;
74
61
}
75
62
You can’t perform that action at this time.
0 commit comments