Skip to content

Instantly share code, notes, and snippets.

@vouill

vouill/logout.js

Last active Dec 4, 2017
Embed
What would you like to do?
auth logout
const actions = {
...
[AUTH_LOGOUT]: ({commit, dispatch}) => {
return new Promise((resolve, reject) => {
commit(AUTH_LOGOUT)
localStorage.removeItem('user-token') // clear your user's token from localstorage
resolve()
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.