Fix bug
This commit is contained in:
parent
f61348f697
commit
bf57b2ad13
1 changed files with 20 additions and 14 deletions
|
@ -118,7 +118,14 @@ if (config.twitter == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const get = new Promise<any>((res, rej) => {
|
||||||
redis.get(sessid, async (_, twCtx) => {
|
redis.get(sessid, async (_, twCtx) => {
|
||||||
|
res(twCtx);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const twCtx = await get;
|
||||||
|
|
||||||
const result = await twAuth.done(JSON.parse(twCtx), ctx.query.oauth_verifier);
|
const result = await twAuth.done(JSON.parse(twCtx), ctx.query.oauth_verifier);
|
||||||
|
|
||||||
const user = await User.findOne({
|
const user = await User.findOne({
|
||||||
|
@ -132,7 +139,6 @@ if (config.twitter == null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
signin(ctx, user, true);
|
signin(ctx, user, true);
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
const verifier = ctx.query.oauth_verifier;
|
const verifier = ctx.query.oauth_verifier;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue