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(authentication): Trigger connect if no connection is available for reconnect.

damenchod0ab6557c1d0
diff --git a/react/features/authentication/actions.web.ts b/react/features/authentication/actions.web.ts
index 8950c46c53..6c99045b87 100644
--- a/react/features/authentication/actions.web.ts
+++ b/react/features/authentication/actions.web.ts
@@ -1,5 +1,6 @@
import { maybeRedirectToWelcomePage } from '../app/actions.web';
import { IStore } from '../app/types';
+import { connect } from '../base/connection/actions';
import { openDialog } from '../base/dialog/actions';
import { setJWT } from '../base/jwt/actions';
import { browser } from '../base/lib-jitsi-meet';
@@ -223,16 +224,20 @@ export function openTokenAuthUrl(tokenAuthServiceUrl: string): any {
const { connection } = getState()['features/base/connection'];
- connection?.refreshToken(token).then(
- () => {
- const { membersOnly } = getState()['features/base/conference'];
-
- membersOnly?.join();
- })
- .catch((err: any) => {
- dispatch(setJWT());
- logger.error(err);
- });
+ if (connection) {
+ connection.refreshToken(token).then(
+ () => {
+ const { membersOnly } = getState()['features/base/conference'];
+
+ membersOnly?.join();
+ })
+ .catch((err: any) => {
+ dispatch(setJWT());
+ logger.error(err);
+ });
+ } else {
+ dispatch(connect());
+ }
})
.catch(err => {
dispatch(showErrorNotification({