mirror of
https://github.com/kevin-DL/comedy-video-lib.git
synced 2026-01-16 04:54:39 +00:00
- 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
20 lines
327 B
Vue
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>
|