I'm trying to use this library to generate a TOTP code. However the code is always different from the one given in my authenticator app. I've tried all the different algorithms and nothing. I wonder if it's something in the timestamp, as I am at UTC + 3, but I don't know how to fix it. I've tried passing as a parameter timestamp: Date.now() and timestamp: Date.now() - 1000 60 60 * 3, but nothing works.
Please have a look at the tests written in the library to validate all the OTP and maybe you will find the answer.
I use it personally and all is working for me with Google Authenticator
I'm trying to use this library to generate a TOTP code. However the code is always different from the one given in my authenticator app. I've tried all the different algorithms and nothing. I wonder if it's something in the timestamp, as I am at UTC + 3, but I don't know how to fix it. I've tried passing as a parameter timestamp: Date.now() and timestamp: Date.now() - 1000 60 60 * 3, but nothing works.