File tree 2 files changed +0
-21
lines changed
2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -78,16 +78,6 @@ module.exports = {
78
78
} ,
79
79
} ,
80
80
81
- /* Amount of time [seconds] before expiration of authentication tokens,
82
- * when the frontend will automatically trigger their refreshment. Once
83
- * ready, it will either write to the Redux store fresh token, or will
84
- * remove auth tokens from the store.
85
- * NOTE: With the current implementation of accounts-app this value must be
86
- * smaller than 60 seconds (earlier than 60 seconds before expiration of an
87
- * auth token, a call to the getFreshToken() method returns the old token,
88
- * due to caching). */
89
- REAUTH_TIME : 55 ,
90
-
91
81
/* API key for Segment.io. For development environment the value is set inside
92
82
* development.json, for production environment it is set via CircleCI
93
83
* variables. */
Original file line number Diff line number Diff line change @@ -107,17 +107,6 @@ function authenticate(store) {
107
107
store . dispatch ( actions . direct . dropAll ( ) ) ;
108
108
store . dispatch ( actions . groups . dropGroups ( ) ) ;
109
109
}
110
-
111
- /* Automatic refreshment of auth tokens. */
112
- let time = Number . MAX_VALUE ;
113
- if ( tctV2 ) time = decodeToken ( tctV2 ) . exp ;
114
- if ( userV3 ) time = Math . min ( time , userV3 . exp ) ;
115
- if ( time < Number . MAX_VALUE ) {
116
- time = 1000 * ( time - window . CONFIG . REAUTH_TIME ) ;
117
- time = Math . max ( 0 , time - Date . now ( ) ) ;
118
- logger . log ( 'Reauth scheduled in' , time / 1000 , 'seconds' ) ;
119
- setTimeout ( ( ) => authenticate ( store ) , time ) ;
120
- }
121
110
} ) ;
122
111
}
123
112
You can’t perform that action at this time.
0 commit comments