mirror of
https://github.com/kevin-DL/comedy-video-lib.git
synced 2026-01-21 15:05:07 +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:
13
store/auth.js
Normal file
13
store/auth.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export const state = () => ({
|
||||
token: null,
|
||||
loggedIn: false,
|
||||
})
|
||||
|
||||
export const mutations = {
|
||||
setToken(state, token) {
|
||||
state.token = token
|
||||
},
|
||||
setLoggedIn(state, loggedIn) {
|
||||
state.loggedIn = loggedIn
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user