Last active
December 4, 2017 11:06
-
-
Save vouill/d0ccfdaecff06ab5f06ea9eed04b6097 to your computer and use it in GitHub Desktop.
auth logout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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