core: fix oauth redirect

This commit is contained in:
undefined committed 2022-09-20 02:23:56 +08:00
1 parent 10dd5d28d5
commit 92c62cb118
6 files changed
+67 -112

No files matched your search

+2
View File
@@ -148,6 +148,7 @@ class UserLogoutHandler extends Handler {
async post() {
this.session.uid = 0;
this.session.scope = PERM.PERM_ALL.toString();
this.response.redirect = '/';
}
}
@@ -379,6 +380,7 @@ class OauthCallbackHandler extends Handler {
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
this.session.uid = udoc._id;
this.session.scope = PERM.PERM_ALL.toString();
this.response.redirect = '/';
return;
}
}