accounts-phone
accounts-phone copied to clipboard
Accounts.verifyPhone() not working properly
Hey, Your package is really of great help, I just had a small issue.
Whenever i try to verify a phone number using the verifyPhone() method, it returns an error in the callback with error 403 saying not a valid code and the user in not logged in instead he is logged out ( I actually logged the user in and then based on whether the phone is verified or not i show him the verification page or home screen).
But after this execution, if i check the database, the user phone is verified and the next time the user logs in, he is directly shown the home page not the verification page.
Any help would be appreciated.
The problem is the verifyPhone
method in the file phone_server.js. It calls
Accounts._clearAllLoginTokens(user._id);
even when a new password is not passed to the method. For my use case, I just commented this line. The author's opinion here would be useful.
Yep, I also had to comment that line.
@abhishekbatra @Vaibhav241196 Hello guys, is there any side effect to comment this line ? Cheers
The side effect could appear when users change their password. I'm not very familiar with meteor's accounts API, but I would guess that the referred line should be conditionally invoked in case of a changed password. I'll post here once I've experimented with this.
On Wed, Dec 14, 2016 at 4:23 PM, Benjamin Cherion [email protected] wrote:
@abhishekbatra https://github.com/abhishekbatra @Vaibhav241196 https://github.com/Vaibhav241196 Hello guys, is there any side effect to comment this line ? Cheers
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/okland/accounts-phone/issues/28#issuecomment-267004352, or mute the thread https://github.com/notifications/unsubscribe-auth/ADnU3SLKJ2RFKtXa3RlYnXLfSClicNsmks5rH8qXgaJpZM4JkrN5 .
ok thanks @abhishekbatra