parent
30444e5f1a
commit
fd947407af
|
@ -53,9 +53,8 @@ export default Vue.extend({
|
||||||
this.signing = true;
|
this.signing = true;
|
||||||
|
|
||||||
(this as any).api('signin', {
|
(this as any).api('signin', {
|
||||||
// password という名前(または username とのペア?)では何らかのフィルタリングがされるっぽい?
|
username: this.username,
|
||||||
x: this.username,
|
password: this.password,
|
||||||
y: this.password,
|
|
||||||
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
|
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
|
@ -12,8 +12,8 @@ export default async (ctx: Koa.Context) => {
|
||||||
ctx.set('Access-Control-Allow-Credentials', 'true');
|
ctx.set('Access-Control-Allow-Credentials', 'true');
|
||||||
|
|
||||||
const body = ctx.request.body as any;
|
const body = ctx.request.body as any;
|
||||||
const username = body['username'] || body['x'];
|
const username = body['username'];
|
||||||
const password = body['password'] || body['y'];
|
const password = body['password'];
|
||||||
const token = body['token'];
|
const token = body['token'];
|
||||||
|
|
||||||
if (typeof username != 'string') {
|
if (typeof username != 'string') {
|
||||||
|
|
Loading…
Reference in a new issue