Files
jitsi-meet/react/features/authentication/actions.web.js
Calinteodor 98658f573c fix(authentication): removed old LoginDialog.js file, fixed redirection to the external auth and created actions.any.js (#9049)
* fix(authentication) login dialog now closes when connection is established

* fix(authentication) fixed shibboleth auth

* fix(authentication) renamed authenticateExternal func to authenticate and updated its logic

* fix(authentication)removed logindialog.js and created actions.any

* fix(authentication) removed focus from externalauthwindow

* fix(authentication) removed private sign from some actions and added openLoginDialog to actions.any

* fix(authentication) exported all from actions.any

* fix(authentication) reverted change regarding externalAuth

* fix(authentication) fixed indentation
2021-04-22 17:05:14 +02:00

66 lines
1.3 KiB
JavaScript

// @flow
import { maybeRedirectToWelcomePage } from '../app/actions';
import { hideDialog, openDialog } from '../base/dialog/actions';
import {
CANCEL_LOGIN
} from './actionTypes';
import { WaitForOwnerDialog, LoginDialog } from './components';
export * from './actions.any';
/**
* Cancels {@ink LoginDialog}.
*
* @returns {{
* type: CANCEL_LOGIN
* }}
*/
export function cancelLogin() {
return {
type: CANCEL_LOGIN
};
}
/**
* Cancels authentication, closes {@link WaitForOwnerDialog}
* and navigates back to the welcome page.
*
* @returns {Function}
*/
export function cancelWaitForOwner() {
return (dispatch: Function) => {
dispatch(maybeRedirectToWelcomePage());
};
}
/**
* Hides a authentication dialog where the local participant
* should authenticate.
*
* @returns {Function}.
*/
export function hideLoginDialog() {
return hideDialog(LoginDialog);
}
/**
* Shows a notification dialog that authentication is required to create the.
* Conference.
* This is used for external auth.
*
* @param {string} room - The room name.
* @param {Function} onAuthNow - The function to be invoked when external authentication.
*
* @returns {Function}.
*/
export function openAuthDialog(room: String, onAuthNow: ?Function) {
return openDialog(WaitForOwnerDialog, {
room,
onAuthNow
});
}