mirror of
https://github.com/kevin-DL/comedy-video-lib.git
synced 2026-01-11 19:04:27 +00:00
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
This commit is contained in:
19
components/Navbar.vue
Normal file
19
components/Navbar.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user