diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-06-03 13:19:07 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-06-03 13:19:07 +0900 |
| commit | 6b2c289029cbf01537c2a67a3e61d615aad30c34 (patch) | |
| tree | 57ed0a426c0144275b758f1139b0c18b7c378ce8 /src | |
| parent | 署名検証失敗はリトライしないように (#6437) (diff) | |
| download | sharkey-6b2c289029cbf01537c2a67a3e61d615aad30c34.tar.gz sharkey-6b2c289029cbf01537c2a67a3e61d615aad30c34.tar.bz2 sharkey-6b2c289029cbf01537c2a67a3e61d615aad30c34.zip | |
fix(api): Fix #6419
Close #6434
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/api/authenticate.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |