Skip to content

Commit

Permalink
Verify fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 21, 2021
1 parent 3e1f6eb commit 91cf826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,7 @@ async function server(args, config, cb) {
req.token = await user.user(decoded.u);
req.token.type = 'token';
} catch (err) {
return res.status(401).json({
status: 401,
message: err.message
});
// Login/Verify uses non-jwt token
}
} else {
req.auth = false;
Expand Down
5 changes: 3 additions & 2 deletions api/web/src/components/Verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ export default {
},
methods: {
verify: async function() {
this.loading = true;
try {
await window.std(`/api/login/verify?token=${this.$route.query.token}`);
this.loading = false;
await window.std(`/api/login/verify?token=${this.$route.query.token}`, {}, false);
} catch(err) {
this.$emit('err', err);
}
this.loading = false;
}
}
}
Expand Down

0 comments on commit 91cf826

Please sign in to comment.