Files
comedy-video-lib/store/auth.js
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

14 lines
221 B
JavaScript

export const state = () => ({
token: null,
loggedIn: false,
})
export const mutations = {
setToken(state, token) {
state.token = token
},
setLoggedIn(state, loggedIn) {
state.loggedIn = loggedIn
},
}