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

heroku-cli-util

Package Overview
Dependencies
Maintainers
5
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-cli-util - npm Package Compare versions

Comparing version 6.1.17 to 6.2.0

12

lib/auth.js

@@ -13,3 +13,3 @@ 'use strict'

function createOAuthToken (username, password, secondFactor) {
function createOAuthToken (username, password, expiresIn, secondFactor) {
const os = require('os')

@@ -28,6 +28,6 @@

description: `Heroku CLI login from ${os.hostname()} at ${new Date()}`,
expires_in: 60 * 60 * 24 * 365 // 1 year
expires_in: expiresIn || 60 * 60 * 24 * 365 // 1 year
}
}).then(function (auth) {
return {token: auth.access_token.token, email: auth.user.email}
return {token: auth.access_token.token, email: auth.user.email, expires_in: auth.access_token.expires_in}
})

@@ -47,3 +47,3 @@ }

function * loginUserPass ({save}) {
function * loginUserPass ({save, expires_in}) {
const {prompt} = require('./prompt')

@@ -57,7 +57,7 @@

try {
auth = yield createOAuthToken(email, password)
auth = yield createOAuthToken(email, password, expires_in)
} catch (err) {
if (!err.body || err.body.id !== 'two_factor') throw err
let secondFactor = yield prompt('Two-factor code', {mask: true})
auth = yield createOAuthToken(email, password, secondFactor)
auth = yield createOAuthToken(email, password, expires_in, secondFactor)
}

@@ -64,0 +64,0 @@ if (save) saveToken(auth)

{
"name": "heroku-cli-util",
"description": "Set of helpful CLI utilities",
"version": "6.1.17",
"version": "6.2.0",
"author": "Jeff Dickey (@dickeyxxx)",

@@ -6,0 +6,0 @@ "bugs": {

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