From 27563c4d2155f691ea01b85e24bbe7733b1de84f Mon Sep 17 00:00:00 2001 From: "Fredrick W. Warren" Date: Sat, 13 Feb 2021 19:46:06 -0800 Subject: [PATCH] 18.07 Logout Button - Log the User Out --- src/layouts/Layout.vue | 4 +++- src/store/store-auth.js | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index e4e1ee9..94280a5 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -15,6 +15,7 @@ /> diff --git a/src/store/store-auth.js b/src/store/store-auth.js index ec4ec15..624df4c 100644 --- a/src/store/store-auth.js +++ b/src/store/store-auth.js @@ -29,6 +29,9 @@ const actions = { console.log('error.message: ', error) }) }, + logoutUser () { + firebaseAuth.signOut() + }, handleAuthStateChange ({ commit }) { firebaseAuth.onAuthStateChanged(function (user) { if (user) {