Use Express instead of custom server, passport for auth and refactor server

This commit is contained in:
Torjus
2018-07-23 12:09:15 +02:00
parent 4431a40297
commit f44bde4ef4
6 changed files with 2947 additions and 3200 deletions
+8 -24
View File
@@ -1079,32 +1079,16 @@ 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._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;
this.changeProfilePicture(request.data.picture);
this._dispatch(stateActions.setPicture(request.data.picture));
this._dispatch(requestActions.notify(
{
text : `Authenticated successfully: ${request.data}`
}
));
}
case 'raisehand-message':