mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-09 17:12:47 +00:00
* fix(meeting_id): Depends on jitsi_session(uses session.user_region). * feat(authentication): A static page that can be used with some auth providers like keycloak. * fix(authentication): Implements inline authentication. squash: Adds refresh token use when refresh token is needed on connection resuming. squash: Fix bugs and move to PKCE flow. * squash: Adds nonce verification. * squash: Drops the closing logic. * squash: Replace resuming event with CONNECTION_TOKEN_EXPIRED one. * squash: Fixes comments. * squash: Make sure we use tokenAuthUrl only when it is set and is not jaas. * squash: Move CONNECTION_TOKEN_EXPIRED to web only middleware as it uses web only logic for now. * squash: Fix comments.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { Linking } from 'react-native';
|
|
|
|
import { IStore } from '../app/types';
|
|
import { isTokenAuthEnabled } from '../authentication/functions';
|
|
import { hangup } from '../base/connection/actions.native';
|
|
import { openDialog } from '../base/dialog/actions';
|
|
|
|
import LogoutDialog from './components/native/LogoutDialog';
|
|
|
|
|
|
/**
|
|
* Opens {@code LogoutDialog}.
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function openLogoutDialog() {
|
|
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
|
const state = getState();
|
|
const { conference } = state['features/base/conference'];
|
|
|
|
const logoutUrl = state['features/base/config'].tokenLogoutUrl;
|
|
|
|
dispatch(openDialog('LogoutDialog', LogoutDialog, {
|
|
onLogout() {
|
|
if (isTokenAuthEnabled(state)) {
|
|
if (logoutUrl) {
|
|
Linking.openURL(logoutUrl);
|
|
}
|
|
|
|
dispatch(hangup(true));
|
|
} else {
|
|
conference?.room.xmpp.moderator.logout(() => dispatch(hangup(true)));
|
|
}
|
|
}
|
|
}));
|
|
};
|
|
}
|