Merge pull request #28 from torjusti/fix/server-refactor

[WIP] Use Express instead of custom server, passport for auth and refactor server files

Remember: config.example.js changed!
This commit is contained in:
Stefan Otto
2018-07-23 13:51:35 +02:00
committed by GitHub
12 changed files with 3003 additions and 3241 deletions
+9 -23
View File
@@ -129,8 +129,6 @@ export default class RoomClient
login()
{
this._dispatch(stateActions.setLoginInProgress(true));
const url = `/login?roomId=${this._room.roomId}&peerName=${this._peerName}`;
this._loginWindow = window.open(url, 'loginWindow');
@@ -1079,32 +1077,20 @@ export default class RoomClient
logger.debug('got auth event from server', request.data);
accept();
if (request.data.verified == true)
{
this.changeDisplayName(request.data.name);
this.changeDisplayName(request.data.name);
this.changeProfilePicture(request.data.picture);
this._dispatch(stateActions.setPicture(request.data.picture));
this.changeProfilePicture(request.data.picture);
this._dispatch(stateActions.setPicture(request.data.picture));
this._dispatch(requestActions.notify(
{
text : `Authenticated successfully: ${request.data}`
}
));
this._dispatch(requestActions.notify(
{
text : `Authenticated successfully: ${request.data}`
}
));
}
else
{
this._dispatch(requestActions.notify(
{
text : `Authentication failed: ${request.data}`
}
));
}
this.closeLoginWindow();
this._dispatch(stateActions.setLoginInProgress(false));
break;
}
case 'raisehand-message':
+1 -3
View File
@@ -129,9 +129,7 @@ class Sidebar extends Component
{me.loginEnabled ?
<div
className={classnames('button', 'login', 'off', {
disabled : me.loginInProgress
})}
className='button login off'
data-tip='Login'
data-type='dark'
onClick={() => onLogin()}
-8
View File
@@ -15,7 +15,6 @@ const initialState =
webcamInProgress : false,
audioInProgress : false,
screenShareInProgress : false,
loginInProgress : false,
loginEnabled : false,
audioOnly : false,
audioOnlyInProgress : false,
@@ -124,13 +123,6 @@ const me = (state = initialState, action) =>
return { ...state, screenShareInProgress: flag };
}
case 'SET_LOGIN_IN_PROGRESS':
{
const { flag } = action.payload;
return { ...state, loginInProgress: flag };
}
case 'SET_DISPLAY_NAME':
{
let { displayName } = action.payload;
-8
View File
@@ -147,14 +147,6 @@ export const setMyRaiseHandState = (flag) =>
};
};
export const setLoginInProgress = (flag) =>
{
return {
type : 'SET_LOGIN_IN_PROGRESS',
payload : { flag }
};
};
export const toggleSettings = () =>
{
return {