Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

otplib

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

otplib - npm Package Compare versions

Comparing version 10.2.2 to 11.0.0

4

authenticator.js

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -64,3 +64,3 @@ **/

var protocol = 'otpauth://totp/';
var value = data.replace('{user}', user).replace('{secret}', secret).replace(/{service}/g, service);
var value = data.replace('{user}', encodeURIComponent(user)).replace('{secret}', secret).replace(/{service}/g, encodeURIComponent(service));
return protocol + value;

@@ -67,0 +67,0 @@ }

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -8,0 +8,0 @@ **/

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -8,0 +8,0 @@ **/

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -8,0 +8,0 @@ **/

{
"name": "otplib",
"version": "10.2.2",
"version": "11.0.0",
"description": "HMAC-based (HOTP) and Time-based (TOTP) One-Time Password library",

@@ -13,3 +13,2 @@ "main": "./index.js",

"clean": "rimraf dist coverage docs",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"lint:js": "eslint \"packages/**/**?(.spec|).js\"",

@@ -20,3 +19,5 @@ "lint:format": "prettier --write \"{packages,scripts,site/scripts,site/public}/**/**.js\"",

"test:nocover": "jest",
"test:watch": "jest --coverage --watch"
"test:watch": "jest --coverage --watch",
"update:release-notes": "npx conventional-github-releaser -p angular",
"upload:coverage": "cat ./coverage/lcov.info | coveralls"
},

@@ -23,0 +24,0 @@ "repository": {

@@ -343,5 +343,10 @@ # otplib

const service = 'A service name';
// v10.x.x and below
const otpauth = otplib.authenticator.keyuri(
encodeURIComponent(user), encodeURIComponent(service), secret);
// v11.x.x and above
const otpauth = otplib.authenticator.keyuri(user, service, secret);
qrcode.toDataURL(otpauth, (err, imageUrl) => {

@@ -348,0 +353,0 @@ if (err) {

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -8,0 +8,0 @@ **/

@@ -5,3 +5,3 @@ /**

* @author Gerald Yeo <contact@fusedthought.com>
* @version: 10.2.2
* @version: 11.0.0
* @license: MIT

@@ -8,0 +8,0 @@ **/

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc