Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions frontend/src/store/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ export default {

dispatch('closeAuthModal');
},
async verifyToken({commit}, data) {
await HttpService.post('/user/token/verify', data, async (res) => {
const success = res.status == 200;

if (!success) {
Vue.notify({
title: "Authentication",
text: "Your login session has expired. Please log in again",
type: "info"
});

commit('logout');
}
});
},
register(store, data) {
return new Promise((resolve) => HttpService.post('/user/register', data, () => {
Vue.notify({
Expand Down