mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix oauth redirect
This commit is contained in:
1 parent
10dd5d28d5
commit
92c62cb118
6 files changed
+67
-112
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user