Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loginWithPassword is not working in Meteor 1.4.3.1 #113

Open
mlarese opened this issue Mar 6, 2017 · 1 comment
Open

loginWithPassword is not working in Meteor 1.4.3.1 #113

mlarese opened this issue Mar 6, 2017 · 1 comment
Labels

Comments

@mlarese
Copy link

mlarese commented Mar 6, 2017

const options = {
email: "[email protected]",
username: "username",
password: "password"
};

asteroid.loginWithPassword(options)

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/livedata_server.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?

@davidebianchi
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants