Clear query params from url with a nasty location update
This commit is contained in:
parent
de165ea6ad
commit
a7c53e99d9
1 changed files with 9 additions and 2 deletions
|
@ -23,6 +23,8 @@ var sdk = require('../../index');
|
||||||
var MatrixTools = require('../../MatrixTools');
|
var MatrixTools = require('../../MatrixTools');
|
||||||
var linkifyMatrix = require("../../linkify-matrix");
|
var linkifyMatrix = require("../../linkify-matrix");
|
||||||
|
|
||||||
|
var url = require('url');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
PageTypes: {
|
PageTypes: {
|
||||||
RoomView: "room_view",
|
RoomView: "room_view",
|
||||||
|
@ -157,8 +159,13 @@ module.exports = {
|
||||||
screen: undefined,
|
screen: undefined,
|
||||||
logged_in: true
|
logged_in: true
|
||||||
});
|
});
|
||||||
self.startMatrixClient();
|
|
||||||
self.notifyNewScreen('');
|
// We're left with the login token, hs and is url as query params
|
||||||
|
// in the url, a little nasty but let's redirect to clear them
|
||||||
|
var parsedUrl = url.parse(window.location.href);
|
||||||
|
parsedUrl.search = "";
|
||||||
|
window.location.href = url.format(parsedUrl);
|
||||||
|
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
self.notifyNewScreen('login');
|
self.notifyNewScreen('login');
|
||||||
self.setState({errorText: 'Login failed.'});
|
self.setState({errorText: 'Login failed.'});
|
||||||
|
|
Loading…
Reference in a new issue