From 41eaffba6d8109d1cc1863b8d3372944842da235 Mon Sep 17 00:00:00 2001 From: konrad Date: Tue, 19 Dec 2017 11:14:49 +0100 Subject: [PATCH] Fixed saving token --- frontend/src/auth/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/auth/index.js b/frontend/src/auth/index.js index 96a2a17..7ecf231 100644 --- a/frontend/src/auth/index.js +++ b/frontend/src/auth/index.js @@ -17,6 +17,7 @@ export default { }) .then(response => { // Save the token to local storage for later use + localStorage.removeItem('token') // Delete an eventually preexisting old token localStorage.setItem('token', response.data.token) // Tell others the user is autheticated