-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harden 2FA/TOTP implementation according to rfc6238 (part 1) #641
Conversation
generate TOTP secret using WebCrypto API (see louislam#640)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor off by 1 can create keys of less than 64 characters.
Do not pass the unit test, it seems that the crypto api is not available in the Node.js |
It is but only as of NodeJS 15. https://nodejs.org/docs/latest/api/webcrypto.html#webcrypto_crypto_getrandomvalues_typedarray |
# Conflicts: # src/util.js
…_patch-1 # Conflicts: # src/util.js
Tested working, but forgot to put in the recent release... Postpone to the next release. |
You're welcome. Last puzzle piece for respecting rfc6238 is also PRed as of now (#743). Would be great if you could add this to the next release as well. It's a simple but important fix. |
Implements issue 1 in #640