mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-23 04:23:35 +00:00
@@ -4,7 +4,7 @@ import { getJson } from '../../../misc/fetch';
|
||||
import { OAuth2 } from 'oauth';
|
||||
import config from '../../../config';
|
||||
import { publishMainStream } from '../../../services/stream';
|
||||
import redis from '../../../db/redis';
|
||||
import { redisClient } from '../../../db/redis';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import signin from '../common/signin';
|
||||
import { fetchMeta } from '../../../misc/fetch-meta';
|
||||
@@ -95,7 +95,7 @@ router.get('/connect/github', async ctx => {
|
||||
state: uuid()
|
||||
};
|
||||
|
||||
redis.set(userToken, JSON.stringify(params));
|
||||
redisClient.set(userToken, JSON.stringify(params));
|
||||
|
||||
const oauth2 = await getOath2();
|
||||
ctx.redirect(oauth2!.getAuthorizeUrl(params));
|
||||
@@ -116,7 +116,7 @@ router.get('/signin/github', async ctx => {
|
||||
httpOnly: true
|
||||
});
|
||||
|
||||
redis.set(sessid, JSON.stringify(params));
|
||||
redisClient.set(sessid, JSON.stringify(params));
|
||||
|
||||
const oauth2 = await getOath2();
|
||||
ctx.redirect(oauth2!.getAuthorizeUrl(params));
|
||||
@@ -143,7 +143,7 @@ router.get('/gh/cb', async ctx => {
|
||||
}
|
||||
|
||||
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
|
||||
redis.get(sessid, async (_, state) => {
|
||||
redisClient.get(sessid, async (_, state) => {
|
||||
res(JSON.parse(state));
|
||||
});
|
||||
});
|
||||
@@ -194,7 +194,7 @@ router.get('/gh/cb', async ctx => {
|
||||
}
|
||||
|
||||
const { redirect_uri, state } = await new Promise<any>((res, rej) => {
|
||||
redis.get(userToken, async (_, state) => {
|
||||
redisClient.get(userToken, async (_, state) => {
|
||||
res(JSON.parse(state));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user