-
Notifications
You must be signed in to change notification settings - Fork 87
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
Meteor.loginWithPhoneAndPassword fails #5
Comments
This issue was caused by LoginHandler registered by Accounts-password package. |
Another property name like 'phonepassword' instead of 'password' need be used to work with accoutns-password package in a same project. |
+1 @byrne-yan how exactly did you work around this? |
It seems to have something to do with the order the login service is registered. I added account-password as a root package, and downloaded and added accounts-phone as a local package. It seem to work for now. |
I'm having the same issue. I followed https://meteorhacks.com/extending-meteor-accounts tutorial for custom authentication then did I20151127-16:01:52.001(8)? Exception while invoking method 'login' Error: Match error: Unknown key in field admin
I20151127-16:01:52.002(8)? at check (packages/check/match.js:33:1)
I20151127-16:01:52.002(8)? at [object Object].Accounts.registerLoginHandler.check.user (password_server.js:248:3)
I20151127-16:01:52.002(8)? at accounts_server.js:462:32
I20151127-16:01:52.002(8)? at tryLoginMethod (accounts_server.js:239:14)
I20151127-16:01:52.002(8)? at AccountsServer.Ap._runLoginHandlers (accounts_server.js:459:18)
I20151127-16:01:52.002(8)? at [object Object].methods.login (accounts_server.js:522:27)
I20151127-16:01:52.003(8)? at maybeAuditArgumentChecks (livedata_server.js:1698:12)
I20151127-16:01:52.003(8)? at livedata_server.js:708:19
I20151127-16:01:52.003(8)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20151127-16:01:52.003(8)? at livedata_server.js:706:40
I20151127-16:01:52.003(8)? Sanitized and reported to the client as: Match failed [400] I found out it's because we're passing a string instead of a I tried passing an object e.g the error went away but it seems to not reach the server's Accounts.registerLoginHandler when I try to It seems the error is due to different Accounts.registerLoginHandler process done in accounts_server and password_server in the meteor codebase and password_server's function will be used when accounts-password is added. Hmmmmm STILL haven't figure out how to use both accounts-ui and accounts-password with custom authentication. Wew. |
@byrne-yan How can you solve the process of sharing to me? I need you help |
@mayinhosa @Micjoyce
2.In Meteor.loginWithPhoneAndPassword function, user's password passed in Accounts.callLoginMethod as the filed of paswordEx:
More details on my project: |
any update on this issue. did any one found the fix for this issue ? |
I have the same issue. Fixed by removing accounts-password, but that has other issues... |
Tried the fix of @byrne-yan, and it worked! To be more specific, here is what fixed the problem:
|
just run
|
I20150827-20:05:10.205(8)? Exception while invoking method 'login' Error: Match error: Unknown key in field phone in field user.phone
I20150827-20:05:10.205(8)? at packages/check/match.js:299:1
I20150827-20:05:10.205(8)? at Function..each..forEach (packages/underscore/underscore.js:113:1)
I20150827-20:05:10.205(8)? at checkSubtree (packages/check/match.js:290:1)
I20150827-20:05:10.206(8)? at check (packages/check/match.js:32:1)
I20150827-20:05:10.206(8)? at [object Object].condition (packages/accounts-password/password_server.js:111:1)
I20150827-20:05:10.206(8)? at checkSubtree (packages/check/match.js:220:1)
I20150827-20:05:10.206(8)? at packages/check/match.js:293:1
I20150827-20:05:10.206(8)? at Function..each..forEach (packages/underscore/underscore.js:113:1)
I20150827-20:05:10.206(8)? at checkSubtree (packages/check/match.js:290:1)
I20150827-20:05:10.207(8)? at check (packages/check/match.js:32:1)
I20150827-20:05:10.207(8)? at [object Object].Accounts.registerLoginHandler.check.user (packages/accounts-password/password_server.js:144:1)
I20150827-20:05:10.207(8)? at packages/accounts-base/accounts_server.js:358:1
I20150827-20:05:10.207(8)? at tryLoginMethod (packages/accounts-base/accounts_server.js:161:1)
I20150827-20:05:10.207(8)? at runLoginHandlers (packages/accounts-base/accounts_server.js:355:1)
I20150827-20:05:10.207(8)? at [object Object].Meteor.methods.login (packages/accounts-base/accounts_server.js:409:1)
I20150827-20:05:10.208(8)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1617:1)
In file password_server.js of package accounts-password:
only one of id,username and email allowed!
The text was updated successfully, but these errors were encountered: