mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
1 parent
ced52792be
commit
301cd8e9d2
1 file changed
+2
-1
@@ -466,6 +466,7 @@ class OauthCallbackHandler extends Handler {
|
||||
if (r.email) {
|
||||
const udoc = await user.getByEmail('system', r.email);
|
||||
if (udoc) {
|
||||
await oauth.set(r._id, udoc._id);
|
||||
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
|
||||
this.session.uid = udoc._id;
|
||||
this.session.scope = PERM.PERM_ALL.toString();
|
||||
@@ -498,7 +499,7 @@ class OauthCallbackHandler extends Handler {
|
||||
username,
|
||||
redirect: this.domain.registerRedirect,
|
||||
set,
|
||||
oauth: [args.type, r.email],
|
||||
oauth: [args.type, r._id],
|
||||
},
|
||||
);
|
||||
this.response.redirect = this.url('user_register_with_code', { code: t });
|
||||
|
||||
Reference in new issue
Block a user