This commit is contained in:
syuilo 2018-04-14 06:41:33 +09:00
parent 562c89cdde
commit 5f3421513b

View file

@ -118,7 +118,14 @@ if (config.twitter == null) {
return;
}
const get = new Promise<any>((res, rej) => {
redis.get(sessid, async (_, twCtx) => {
res(twCtx);
});
});
const twCtx = await get;
const result = await twAuth.done(JSON.parse(twCtx), ctx.query.oauth_verifier);
const user = await User.findOne({
@ -132,7 +139,6 @@ if (config.twitter == null) {
}
signin(ctx, user, true);
});
} else {
const verifier = ctx.query.oauth_verifier;