Skip to content

Commit

Permalink
fix: Fixes #10796 authentication in conference.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Jan 25, 2022
1 parent b3c4fb6 commit 419decb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function _mapStateToProps(state) {
progress,
thenableWithCancel
} = state['features/authentication'];
const { authRequired } = state['features/base/conference'];
const { conference } = state['features/base/conference'];
const { hosts: configHosts } = state['features/base/config'];
const {
connecting,
Expand All @@ -346,7 +346,7 @@ function _mapStateToProps(state) {

return {
..._abstractMapStateToProps(state),
_conference: authRequired,
_conference: conference,
_configHosts: configHosts,
_connecting: Boolean(connecting) || Boolean(thenableWithCancel),
_error: connectionError || authenticateAndUpgradeRoleError,
Expand Down
4 changes: 2 additions & 2 deletions react/features/authentication/components/web/LoginDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ function mapStateToProps(state) {
progress,
thenableWithCancel
} = state['features/authentication'];
const { authRequired } = state['features/base/conference'];
const { conference } = state['features/base/conference'];
const { hosts: configHosts } = state['features/base/config'];
const {
connecting,
error: connectionError
} = state['features/base/connection'];

return {
_conference: authRequired,
_conference: conference,
_configHosts: configHosts,
_connecting: connecting || thenableWithCancel,
_error: connectionError || authenticateAndUpgradeRoleError,
Expand Down
10 changes: 10 additions & 0 deletions react/features/authentication/middleware.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { MiddlewareRegistry } from '../base/redux';
import {
CANCEL_LOGIN,
STOP_WAIT_FOR_OWNER,
UPGRADE_ROLE_FINISHED,
WAIT_FOR_OWNER
} from './actionTypes';
import {
Expand Down Expand Up @@ -123,6 +124,15 @@ MiddlewareRegistry.register(store => next => action => {
store.dispatch(hideDialog(WaitForOwnerDialog));
break;

case UPGRADE_ROLE_FINISHED: {
const { error, progress } = action;

if (!error && progress === 1) {
_hideLoginDialog(store);
}
break;
}

case WAIT_FOR_OWNER: {
_clearExistingWaitForOwnerTimeout(store);

Expand Down
10 changes: 10 additions & 0 deletions react/features/authentication/middleware.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { MiddlewareRegistry } from '../base/redux';
import {
CANCEL_LOGIN,
STOP_WAIT_FOR_OWNER,
UPGRADE_ROLE_FINISHED,
WAIT_FOR_OWNER
} from './actionTypes';
import {
Expand Down Expand Up @@ -91,6 +92,15 @@ MiddlewareRegistry.register(store => next => action => {
store.dispatch(hideDialog(WaitForOwnerDialog));
break;

case UPGRADE_ROLE_FINISHED: {
const { error, progress } = action;

if (!error && progress === 1) {
store.dispatch(hideLoginDialog());
}
break;
}

case WAIT_FOR_OWNER: {
_clearExistingWaitForOwnerTimeout(store);

Expand Down

0 comments on commit 419decb

Please sign in to comment.