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

@adobe/aio-lib-ims-oauth

Package Overview
Dependencies
Maintainers
21
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aio-lib-ims-oauth - npm Package Compare versions

Comparing version 5.0.2 to 5.1.0

6

package.json
{
"name": "@adobe/aio-lib-ims-oauth",
"description": "OAuth2 (SUSI) token creation plugin for @adobe/aio-lib-ims",
"version": "5.0.2",
"version": "5.1.0",
"author": "Adobe Inc.",

@@ -11,4 +11,4 @@ "bugs": "https://github.com/adobe/aio-lib-ims-oauth/issues",

"@adobe/aio-lib-env": "^2.0.0",
"@oclif/core": "^1.14.2",
"ora": "^4.0.3"
"@oclif/core": "^2.3.0",
"open": "^8.4.2"
},

@@ -15,0 +15,0 @@ "peerDependencies": {

@@ -76,3 +76,10 @@ /*

.then(() => {
const options = { bare: config[CLI_BARE_OUTPUT], env: config.env, timeout: config.timeout, open: config.open, browser: config.browser }
const options = {
client_id: config.client_id,
bare: config[CLI_BARE_OUTPUT],
env: config.env,
timeout: config.timeout,
open: config.open,
browser: config.browser
}
return login(options)

@@ -79,0 +86,0 @@ })

@@ -14,4 +14,4 @@ /*

const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-lib-ims-oauth:login', { provider: 'debug' })
const ora = require('ora')
const { CliUx } = require('@oclif/core')
const { ux } = require('@oclif/core')
const open = require('open')
const { randomId, authSiteUrl, getImsCliOAuthUrl, createServer, handleOPTIONS, handleGET, handlePOST, handleUnsupportedHttpMethod } = require('./helpers')

@@ -37,4 +37,12 @@ const { codes: errors } = require('./errors')

// eslint-disable-next-line camelcase
const { bare = false, env, timeout = AUTH_TIMEOUT_SECONDS, client_id, scope, open = true, browser: app } = options
const {
bare = false,
env,
timeout = AUTH_TIMEOUT_SECONDS,
client_id, // eslint-disable-line camelcase
scope,
open: autoOpen = true,
browser: app
} = options
const redirect_uri = `${getImsCliOAuthUrl(env)}${LOGIN_SUCCESS}` // eslint-disable-line camelcase

@@ -50,13 +58,9 @@ const id = randomId()

return new Promise((resolve, reject) => {
let spinner
if (!bare) {
console.log('Visit this url to log in: ')
CliUx.ux.url(uri, uri)
spinner = ora('Waiting for browser login').start()
ux.url(uri, uri)
ux.action.start('Waiting for browser login')
}
if (open) {
CliUx.ux.open(uri, {
app
})
if (autoOpen) {
open(uri, { app })
}

@@ -67,3 +71,3 @@

if (!bare) {
spinner.stop()
ux.action.stop()
}

@@ -75,3 +79,3 @@ }, timeout * 1000)

if (!bare) {
spinner.stop()
ux.action.stop()
}

@@ -103,3 +107,4 @@ server.close()

if (!bare) {
spinner.fail()
ux.action.stop()
// spinner.fail()
}

@@ -106,0 +111,0 @@ cleanup()

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