Files
comedy-video-lib/components/Navbar.vue
Kevin ANATOLE de3d4d03c3 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
2020-11-07 20:59:46 +00:00

20 lines
327 B
Vue

<template>
<div></div>
</template>
<script>
export default {
name: 'Navbar',
data() {},
methods: {
async logout() {
await this.$magic.user.logout()
this.$store.commit('auth/setToken', null)
this.$store.commit('auth/setLoggedIn', false)
},
},
}
</script>
<style lang="scss" scoped>
</style>