forked from mirror/misskey
fix(server): cookieが取得されないのを修正
This commit is contained in:
parent
3b7c943440
commit
9d14476a6a
@ -13,8 +13,8 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
|
|||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
||||||
import { SigninService } from '../SigninService.js';
|
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
|
import { SigninService } from '../SigninService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DiscordServerService {
|
export class DiscordServerService {
|
||||||
@ -140,7 +140,7 @@ export class DiscordServerService {
|
|||||||
const oauth2 = await getOAuth2();
|
const oauth2 = await getOAuth2();
|
||||||
|
|
||||||
if (!userToken) {
|
if (!userToken) {
|
||||||
const sessid = request.cookies.get('signin_with_discord_sid');
|
const sessid = request.cookies['signin_with_discord_sid'];
|
||||||
|
|
||||||
if (!sessid) {
|
if (!sessid) {
|
||||||
throw new FastifyReplyError(400, 'invalid session');
|
throw new FastifyReplyError(400, 'invalid session');
|
||||||
|
@ -138,7 +138,7 @@ export class GithubServerService {
|
|||||||
const oauth2 = await getOath2();
|
const oauth2 = await getOath2();
|
||||||
|
|
||||||
if (!userToken) {
|
if (!userToken) {
|
||||||
const sessid = request.cookies.get('signin_with_github_sid');
|
const sessid = request.cookies['signin_with_github_sid'];
|
||||||
|
|
||||||
if (!sessid) {
|
if (!sessid) {
|
||||||
throw new FastifyReplyError(400, 'invalid session');
|
throw new FastifyReplyError(400, 'invalid session');
|
||||||
|
@ -13,8 +13,8 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
|
|||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
|
||||||
import { SigninService } from '../SigninService.js';
|
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
|
import { SigninService } from '../SigninService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TwitterServerService {
|
export class TwitterServerService {
|
||||||
@ -127,7 +127,7 @@ export class TwitterServerService {
|
|||||||
const twAuth = await getTwAuth();
|
const twAuth = await getTwAuth();
|
||||||
|
|
||||||
if (userToken == null) {
|
if (userToken == null) {
|
||||||
const sessid = request.cookies.get('signin_with_twitter_sid');
|
const sessid = request.cookies['signin_with_twitter_sid'];
|
||||||
|
|
||||||
if (sessid == null) {
|
if (sessid == null) {
|
||||||
throw new FastifyReplyError(400, 'invalid session');
|
throw new FastifyReplyError(400, 'invalid session');
|
||||||
|
Loading…
Reference in New Issue
Block a user