Skip to content

Instantly share code, notes, and snippets.

@vouill
Last active December 4, 2017 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vouill/d0ccfdaecff06ab5f06ea9eed04b6097 to your computer and use it in GitHub Desktop.
Save vouill/d0ccfdaecff06ab5f06ea9eed04b6097 to your computer and use it in GitHub Desktop.
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