Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created January 15, 2022 14:42
Show Gist options
  • Save PatrickKalkman/df2a95ecf04516e4624c818bc7318bdd to your computer and use it in GitHub Desktop.
Save PatrickKalkman/df2a95ecf04516e4624c818bc7318bdd to your computer and use it in GitHub Desktop.
The validate token method in the Vuex store
validateToken({ commit }, credentials) {
return apiClient
.post('/user/validatetoken', credentials)
.then(({ data }) => {
commit('SET_TWOFACTOR_LOGIN', data.validated);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment