[solved] Accounts-password can't verify token

Hi Guys,
stupid topic…I need to verify a token but I can’t.
I get exception:

I20160928-22:49:03.916(2)?     at exports.check (packages/check/match.js:34:1)
I20160928-22:49:03.916(2)?     at packages/accounts-password/password_server.js:815:7
I20160928-22:49:03.917(2)?     at tryLoginMethod (packages/accounts-base/accounts_server.js:248:14)
I20160928-22:49:03.917(2)?     at AccountsServer.Ap._loginMethod (packages/accounts-base/accounts_server.js:381:5)
I20160928-22:49:03.917(2)?     at [object Object].verifyEmail (packages/accounts-password/password_server.js:809:19)
I20160928-22:49:03.919(2)?     at packages/check/match.js:107:1
I20160928-22:49:03.920(2)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160928-22:49:03.921(2)?     at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
I20160928-22:49:03.921(2)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1708:18)
I20160928-22:49:03.922(2)?     at packages/ddp-server/livedata_server.js:711:19
I20160928-22:49:03.933(2)? Sanitized and reported to the client as: Match failed [400]

Invocation:

Accounts.verifyEmail({
            token: ""+token,
        }, (error) => {

token IS bloody string…
package version is 1.3.0 and meteor is newest possible
I tried casting String(token) but still nothing. I made console.log of token I know what it is. Yes this is done on client side.

Not sure, but do you really need to use that object as a parameter?

Isn’t the format this: Accounts.verifyEmail('tokenHereAsString', (error) => {});

1 Like