Copilot commented on code in PR #3693:
URL: https://github.com/apache/texera/pull/3693#discussion_r2297579303


##########
core/gui/src/app/common/service/user/auth.service.ts:
##########
@@ -171,6 +170,8 @@ export class AuthService {
 
   private registerAutoRefreshToken() {
     this.refreshTokenSubscription?.unsubscribe();
+    const TOKEN_REFRESH_INTERVAL_IN_MIN = 
this.config.env.expirationTimeInMinutes
+    // Token Refresh Interval set to Token Expiration Time

Review Comment:
   The token refresh interval is set to the same value as the token expiration 
time, which could cause tokens to expire before they are refreshed. Consider 
setting the refresh interval to a value less than the expiration time (e.g., 
80% of expiration time) to ensure tokens are refreshed before they expire.
   ```suggestion
       const TOKEN_REFRESH_INTERVAL_IN_MIN = 
this.config.env.expirationTimeInMinutes * 0.8;
       // Token Refresh Interval set to 80% of Token Expiration Time
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to