core: handle oauth redirect

This commit is contained in:
undefined committed 2022-04-10 19:51:02 +08:00
1 parent fc95226ce4
commit d19476d7e7
4 files changed
+3 -3

No files matched your search

-1
View File
@@ -72,7 +72,6 @@ async function callback({ state, code }) {
}
await token.del(s._id, token.TYPE_OAUTH);
if (!ret.email) throw new ForbiddenError("You don't have a verified email.");
this.response.redirect = (s.redirect || '').endsWith('/login') ? '/' : s.redirect;
return ret;
}