Skip to content

Commit

Permalink
comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke committed Jul 22, 2024
1 parent 82767f3 commit 0684955
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/Root/FFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ export class FFetch {

/**
* scheduleRotation
* Given a promise that resolves with timestamps for the AT's and RT's
* expiration, configure relevant corresponding timers:

Check failure on line 103 in src/components/Root/FFetch.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Trailing spaces not allowed
* * before the AT expires, conduct RTR
* * when the RT is about to expire, send a "session will end" event
* * when the RT expires, send a "session ended" event"
*
* @param {Promise} rotationP
*/
Expand All @@ -107,7 +112,7 @@ export class FFetch {
// AT refresh interval: a large fraction of the actual AT TTL
const atInterval = (rotationInterval.accessTokenExpiration - Date.now()) * RTR_AT_TTL_FRACTION;

// rotationInterval.refreshTokenExpiration = Date.now() + ms('75s');
// RT timeout interval (session will end) and warning interval (warning that session will end)
const rtTimeoutInterval = (rotationInterval.refreshTokenExpiration - Date.now());
const rtWarningInterval = (rotationInterval.refreshTokenExpiration - Date.now()) - ms(this.rtrConfig.fixedLengthSessionWarningTTL);

Expand Down Expand Up @@ -154,10 +159,6 @@ export class FFetch {
rotateCallback = (res) => {
this.logger.log('rtr', 'rotation callback setup', res);

// @@ const rotationPromise = Promise.resolve(ms(RTR_AT_EXPIRY_IF_UNKNOWN));
// @@ scheduleRotation(rotationPromise);
// @@ return;

// When starting a new session, the response from /bl-users/login-with-expiry
// will contain token expiration info, but when restarting an existing session,
// the response from /bl-users/_self will NOT, although that information should
Expand Down

0 comments on commit 0684955

Please sign in to comment.