Skip to content

Commit 7e91419

Browse files
Merge pull request #4958 from topcoder-platform/issue-4953
Remove reauth from community-app
2 parents 4119aca + ca7459e commit 7e91419

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

config/default.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ module.exports = {
7878
},
7979
},
8080

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-
9181
/* API key for Segment.io. For development environment the value is set inside
9282
* development.json, for production environment it is set via CircleCI
9383
* variables. */

src/client/index.jsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,6 @@ function authenticate(store) {
107107
store.dispatch(actions.direct.dropAll());
108108
store.dispatch(actions.groups.dropGroups());
109109
}
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-
}
121110
});
122111
}
123112

0 commit comments

Comments
 (0)