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