Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
github.com/stubbornpeanut/otp
Guardtower leverages OTP to support multi-factor authentication. Because this product is security-sensitive, and with all the recent supply-chain attacks, I thought it best to fork pquerna/otp, review the code, and then be able to review and filter any updates that looked suspicious.
Furthermore, the code hasn't been tagged with a new release in 18 months, which worried me a bit. This allows me to tag releases at my own pace and keep the software up to date as needed.
Note there are no additional features in this version of pquerna/otp. It is purely for my personal use, though you are welcome to use it in your own applications, obviously.
One Time Passwords (OTPs) are an mechanism to improve security over passwords alone. When a Time-based OTP (TOTP) is stored on a user's phone, and combined with something the user knows (Password), you have an easy on-ramp to Multi-factor authentication without adding a dependency on a SMS provider. This Password and TOTP combination is used by many popular websites including Google, GitHub, Facebook, Salesforce and many others.
The otp
library enables you to easily add TOTPs to your own application, increasing your
user's security against mass-password breaches and malware.
Because TOTP is standardized and widely deployed, there are many mobile clients and software implementations.
For an example of a working enrollment work flow, GitHub has documented theirs, but the basics are:
key,_ := totp.Generate(...)
.key.Secret()
and key.Image(...)
.totp.Validate(...)
.key.Secret()
GenerateCode
function and a counter or
time.Time
struct to generate a valid code compatible with most implementations.GenerateCodeCustom
in either module.totp.Validate(...)
When a user loses access to their TOTP device, they would no longer have access to their account. Because TOTPs are often configured on mobile devices that can be lost, stolen or damaged, this is a common problem. For this reason many providers give their users "backup codes" or "recovery codes". These are a set of one time use codes that can be used instead of the TOTP. These can simply be randomly generated strings that you store in your backend. Github's documentation provides an overview of the user experience.
otp
is licensed under the Apache License, Version 2.0
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.