Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(jwt): Some services will not give you a new token till it is expired.

damencho5da150d8efda
diff --git a/react/features/app/actions.any.ts b/react/features/app/actions.any.ts
index 98b88e3cbc..99413f2918 100644
--- a/react/features/app/actions.any.ts
+++ b/react/features/app/actions.any.ts
@@ -122,9 +122,8 @@ export function maybeRedirectToTokenAuthUrl(
const refreshToken = state['features/base/jwt'].refreshToken;
const expirationDate = getJwtExpirationDate(jwt);
- // if there is jwt and its expiration time is less than 3 minutes away
- // let's obtain new token
- if (expirationDate && expirationDate.getTime() - Date.now() < 3 * 60 * 1000) {
+ // if there is jwt token, and it is expired let's obtain a new one
+ if (expirationDate && expirationDate.getTime() <= Date.now()) {
const room = state['features/base/conference'].room;
const { tenant } = parseURIString(locationURL.href) || {};