From de3d4d03c37a4fd64960ced2927858cf99a56fb3 Mon Sep 17 00:00:00 2001 From: Kevin ANATOLE Date: Sat, 7 Nov 2020 20:56:38 +0000 Subject: [PATCH] Authentication - Installed magic-sdk - Created a login button with email - Store the token and user login state in the vuex store - Created a logout method that resets the store --- components/Navbar.vue | 19 ++++++++++++ layouts/default.vue | 11 +++++++ nuxt.config.js | 5 ++- package-lock.json | 71 +++++++++++++++++++++++++++++++++++++++++++ package.json | 6 +--- pages/index.vue | 50 ++++++++++++++++++------------ plugins/magic.js | 7 +++++ store/auth.js | 13 ++++++++ 8 files changed, 157 insertions(+), 25 deletions(-) create mode 100644 components/Navbar.vue create mode 100644 plugins/magic.js create mode 100644 store/auth.js diff --git a/components/Navbar.vue b/components/Navbar.vue new file mode 100644 index 0000000..c673387 --- /dev/null +++ b/components/Navbar.vue @@ -0,0 +1,19 @@ + + + + diff --git a/layouts/default.vue b/layouts/default.vue index 2170b7d..a480f5a 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -3,6 +3,17 @@ +