From 272a2fe6d39376df502e12cca3e9d8b4a823f415 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Wed, 15 Jan 2020 23:12:37 +0100 Subject: [PATCH] Fix token not being saved to storage during login --- resources/js/views/auth/Login.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/js/views/auth/Login.vue b/resources/js/views/auth/Login.vue index fbe10841..5c2343bb 100644 --- a/resources/js/views/auth/Login.vue +++ b/resources/js/views/auth/Login.vue @@ -61,6 +61,8 @@ password: this.password }) .then(response => { + localStorage.setItem('user',response.data.message.name) + localStorage.setItem('jwt',response.data.message.token) if (localStorage.getItem('jwt') != null){ this.$router.go('/');