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
22
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.3.1 to 5.4.0-pre.2024-01-08.sha-e584fa01

31

package.json
{
"name": "@adobe/aio-lib-ims-oauth",
"description": "OAuth2 (SUSI) token creation plugin for @adobe/aio-lib-ims",
"version": "5.3.1",
"version": "5.4.0-pre.2024-01-08.sha-e584fa01",
"author": "Adobe Inc.",
"bugs": "https://github.com/adobe/aio-lib-ims-oauth/issues",
"dependencies": {
"@adobe/aio-lib-core-errors": "^3.1.0",
"@adobe/aio-lib-core-logging": "^2.0.0",
"@adobe/aio-lib-core-errors": "next",
"@adobe/aio-lib-core-logging": "next",
"@adobe/aio-lib-env": "^2.0.0",

@@ -18,11 +18,11 @@ "open": "^8.4.2",

"devDependencies": {
"@adobe/eslint-config-aio-lib-config": "^2",
"eslint": "^8",
"eslint-config-standard": "^17",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^23",
"eslint-plugin-jsdoc": "^37",
"eslint-plugin-n": "^15",
"@adobe/eslint-config-aio-lib-config": "^2.0.1",
"eslint": "^8.48.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jsdoc": "^42.0.0",
"eslint-plugin-n": "^15.7",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-standard": "^5.0.0",

@@ -33,7 +33,7 @@ "globby": "^10.0.1",

"stdout-stderr": "^0.1.9",
"typescript": "^5.0.4"
"typescript": "^5.2.2"
},
"engineStrict": true,
"engines": {
"node": "^14.18 || ^16.13 || >=18"
"node": ">=18"
},

@@ -52,3 +52,4 @@ "files": [

"version": "git add README.md"
}
}
},
"prereleaseSha": "e584fa01317be360ea69e34de95dc5f51f96afce"
}

@@ -29,2 +29,8 @@ /*

const IMS_CLI_OAUTH_LOGOUT_URL = {
// TODO: separate out client_id
prod: 'https://ims-na1.adobelogin.com/ims/logout/v1?client_id=aio-cli-console-auth&redirect_uri=',
stage: 'https://ims-na1-stg1.adobelogin.com/ims/logout/v1?client_id=aio-cli-console-auth-stage&redirect_uri='
}
/**

@@ -61,5 +67,6 @@ * Create a local server.

* @param {string} [env=prod] the IMS environment
* @param {boolean} [forceLogin=false] whether to force a logout before login
* @returns {string} the constructed url
*/
function authSiteUrl (queryParams, env = getCliEnv()) {
function authSiteUrl (queryParams, env = getCliEnv(), forceLogin = false) {
const uri = new url.URL(getImsCliOAuthUrl(env))

@@ -74,3 +81,9 @@ aioLogger.debug(`authSiteUrl queryParams: ${JSON.stringify(queryParams)} env: ${env} uri: ${uri}`)

})
return uri.href
if (forceLogin) {
const forceUri = new url.URL(IMS_CLI_OAUTH_LOGOUT_URL[env])
forceUri.searchParams.set('redirect_uri', encodeURI(uri.href))
return forceUri.href
} else {
return uri.href
}
}

@@ -309,3 +322,4 @@

IMS_CLI_OAUTH_URL,
IMS_CLI_OAUTH_LOGOUT_URL,
getImsCliOAuthUrl
}

@@ -82,3 +82,4 @@ /*

open: config.open,
browser: config.browser
browser: config.browser,
forceLogin: config.forceLogin
}

@@ -85,0 +86,0 @@ return login(options)

@@ -42,2 +42,3 @@ /*

scope,
forceLogin,
open: autoOpen = true,

@@ -52,3 +53,3 @@ browser: app

// eslint-disable-next-line camelcase
const uri = authSiteUrl({ id, port: serverPort, client_id, scope, redirect_uri }, env)
const uri = authSiteUrl({ id, port: serverPort, client_id, scope, redirect_uri }, env, forceLogin)

@@ -61,4 +62,5 @@ aioLogger.debug(`Local server created on port ${serverPort}.`)

// stderr so it is always visible
console.error('Visit this url to log in:\n', uri)
spinner = ora('Waiting for browser login').start()
spinner = ora()
spinner.stopAndPersist({ text: 'Visit this url to log in:\n' + uri })
spinner.start('Waiting for browser login')
}

@@ -70,6 +72,6 @@ if (autoOpen) {

const timerId = setTimeout(() => {
reject(new errors.TIMEOUT({ messageValues: timeout }))
if (!bare) {
spinner.fail()
}
reject(new errors.TIMEOUT({ messageValues: timeout }))
}, timeout * 1000)

@@ -76,0 +78,0 @@

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