feat: Set the session token in Application

This commit is contained in:
Alexander Polynomdivision
2018-09-19 18:18:32 +02:00
parent fbb27b8947
commit 286927663a
5 changed files with 30 additions and 10 deletions

View File

@@ -35,8 +35,6 @@ const LoginPageWithRouter = withRouter(
const username = this.usernameRef.value || "";
const password = this.passwordRef.value || "";
this.props.login(username, password).then((res: IUser) => {
// Set the session key
window.sessionStorage.setItem("sessionToken", res.sessionToken);
this.props.history.push("/dashboard");
}, (err) => {
this.props.setLoading(false);