From 6b2c289029cbf01537c2a67a3e61d615aad30c34 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 3 Jun 2020 13:19:07 +0900 Subject: [PATCH] fix(api): Fix #6419 Close #6434 --- src/server/api/authenticate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/api/authenticate.ts b/src/server/api/authenticate.ts index c3e277e8de..0785372b3b 100644 --- a/src/server/api/authenticate.ts +++ b/src/server/api/authenticate.ts @@ -21,7 +21,11 @@ export default async (token: string): Promise<[User | null | undefined, AccessTo return [user, null]; } else { const accessToken = await AccessTokens.findOne({ - hash: token.toLowerCase() + where: [{ + hash: token.toLowerCase() // app + }, { + token: token // miauth + }], }); if (accessToken == null) {