Comments (6)
Solved my own issue, my computer datetime was not automatically sync'd at the OS level and therefore was out of time vs google's clock and couldn't provide the matching time for recreating OTP.
from speakeasy.
Thanks for the update!
from speakeasy.
Not a problem, now it seems I'm having an issue with my clocks not staying in perfect sync after the first QR code is generated (within the first 60 seconds). I was given a suggestion by a colleague who mentioned I should add a slight variance to the code by setting the current unix time -30 seconds and running a loop over it (ie. speakeasy.totp({key: 'secret', time: 159183717});) when verifying TOTP
Would you advice against this or does this seem like an appropriate solution?
from speakeasy.
Hmm, that seems to work but it doesn't seem like a clean solution.
So it seems like you get a code at Time 0 (e.g. 159183700)
and then, 30 seconds later, you're getting another code at Time 1 (e.g. 159183730)
but the Time 1 code is wrong?
from speakeasy.
Again I solved my own issue, the problem this time was that each time I was verifying the code via speakeasy.time({key: '3jk2h5kj2h63kj2h6kjh23jh6hlkj2h6ljk2h3h', encoding: 'base32'}); it was OUTSIDE my route middleware therefore only loading the variable on initial startup but not each subsequent request... Now that i've moved inside my middleware it's functioning as expected. Thanks for your patients!
from speakeasy.
Great to hear, thanks!
from speakeasy.
Related Issues (20)
- Valid usage question (using this in reverse)
- Add function Speakeasy.otpauthFromURL HOT 1
- Demo site not working
- The issuer option is not included in latest realease HOT 3
- I made a fork, use that instead HOT 1
- Base32 secrets with a length not a multiple of 8 may produce incorrect codes
- New totp every function call HOT 2
- weird behaviour always gets false HOT 1
- [hotp] Was not giving right code...(So I Maintained for 2021) HOT 2
- Send key/secret to client
- TOTP verification failure HOT 2
- The URI format is described here: https://github.com/google/google-authenticator/wiki/Key-Uri-Format <https://github.com/google/google-authenticator/wiki/Key-Uri-Format>
- Old secrets doesnt work
- Ping
- can't read property generateSecretASCII of undefined HOT 2
- Buffer() is deprecated due to security and usability issues.
- TFA With Google authenticator not working for IOS HOT 2
- Unmaintained Package - Recommended Alternative
- util.deprecate is not a function, The function that is being deprecated
- Generated 2FA code is invalid and different from google Authenicator app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speakeasy.