Open mlarese opened 7 years ago
Hi @mlarese,
in loginWithPassword
function should be passed only one parameter between email and username, as required in meteor docs. If you pass more parameter, it throws error code 400.
I've added some e2e test to the login function, and I've covered also that case.
If you try to remove one of email and username, it resolve the issue?
Davide
const options = { email: "email@gmail.com", username: "username", password: "password" };
It raise this error I20170306-06:23:51.005(1)? Exception while invoking method 'login' Error: Match error: Match error: User property must have exactly one field in field user I20170306-06:23:51.005(1)? at exports.check (packages/check.js:57:15) I20170306-06:23:51.006(1)? at [object Object]. (packages/accounts-password/password_server.js:250:3)
I20170306-06:23:51.006(1)? at packages/accounts-base/accounts_server.js:471:32
I20170306-06:23:51.006(1)? at tryLoginMethod (packages/accounts-base/accounts_server.js:248:14)
I20170306-06:23:51.007(1)? at AccountsServer.Ap._runLoginHandlers (packages/accounts-base/accounts_server.js:468:18)
I20170306-06:23:51.007(1)? at [object Object].methods.login (packages/accounts-base/accounts_server.js:531:27)
I20170306-06:23:51.007(1)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1737:12)
I20170306-06:23:51.007(1)? at packages/ddp-server/livedataserver.js:719:19
I20170306-06:23:51.008(1)? at [object Object]..extend.withValue (packages/meteor.js:1122:17)
I20170306-06:23:51.008(1)? at packages/ddp-server/livedata_server.js:717:40
I20170306-06:23:51.008(1)? Sanitized and reported to the client as: Match failed [400]
The type of error (400) is thrown when the options passed are not in the right format. Something has changed in this new Meteor version?