1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-24 23:26:35 +09:00

Merge pull request #2389 from Tosuke/fix-2384

Fix login bug(#2384)
This commit is contained in:
syuilo 2018-08-22 09:27:09 +09:00 committed by GitHub
commit 933e25804c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,8 +12,9 @@ export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Credentials', 'true');
const body = ctx.request.body as any;
const username = body['username'];
const password = body['password'];
// See: https://github.com/syuilo/misskey/issues/2384
const username = body['username'] || body['x'];
const password = body['password'] || body['y'];
const token = body['token'];
if (typeof username != 'string') {