Richi Posted December 11, 2016 Report Posted December 11, 2016 Hi! I'm tryng to use changePassword function, but it returns eresult: 8It doesn't works, or I just use it wrong?Thanks. There is the sample code which I use: client.requestPasswordChangeEmail(password, function(err) { console.log("Req: "+ err); var rl = require('readline').createInterface({ "input": process.stdin, "output": process.stdout }); rl.question('Code: ', function(code) { client.changePassword(password, newpassword, code, function(err) { console.log(err);} ); console.log(code); rl.close(); }); }); Quote
Dr. McKay Posted December 11, 2016 Report Posted December 11, 2016 Formatted code so it's actually readable: client.requestPasswordChangeEmail(password, function(err) { console.log("Req: "+ err); var rl = require('readline').createInterface({ "input": process.stdin, "output": process.stdout }); rl.question('Code: ', function(code) { client.changePassword(password, newpassword, code, function(err) { console.log(err); }); console.log(code); rl.close(); }); }); Where are you getting 8? When you request the email, or when you call changePassword? Quote
Richi Posted December 12, 2016 Author Report Posted December 12, 2016 It's 8 when I call changePassword. Request to email works good.Found out that changePassword works, if account using without Mobile Authenicator. If the mobile authenticator is on, I get 8 even if I send 2fa token as "code". Quote
Dr. McKay Posted December 13, 2016 Report Posted December 13, 2016 (edited) Are you sure that you aren't reusing a 2FA code? My testing reveals that you get error 8 if you try to use a 2FA code which has already been used (perhaps to login). Edited December 13, 2016 by Dr. McKay Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.