✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.69
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/lib/auth//legacy.js
const profile = require('npm-profile')
const log = require('../utils/log-shim')
const openUrlPrompt = require('../utils/open-url-prompt.js')
const read = require('../utils/read-user-info.js')

const loginPrompter = async (creds) => {
  creds.username = await read.username('Username:', creds.username)
  creds.password = await read.password('Password:', creds.password)
  creds.email = await read.email('Email: (this IS public) ', creds.email)

  return creds
}

const login = async (npm, opts) => {
  let res

  const requestOTP = async () => {
    const otp = await read.otp(
      'Enter one-time password: '
    )

    return profile.loginCouch(
      opts.creds.username,
      opts.creds.password,
      { ...opts, otp }
    )
  }

  const addNewUser = async () => {
    let newUser

    try {
      newUser = await profile.adduserCouch(
        opts.creds.username,
        opts.creds.email,
        opts.creds.password,
        opts
      )
    } catch (err) {
      if (err.code === 'EOTP') {
        newUser = await requestOTP()
      } else {
        throw err
      }
    }

    return newUser
  }

  const openerPromise = (url, emitter) =>
    openUrlPrompt(
      npm,
      url,
      'Authenticate your account at',
      'Press ENTER to open in the browser...',
      emitter
    )

  try {
    res = await profile.login(openerPromise, loginPrompter, opts)
  } catch (err) {
    const needsMoreInfo = !(opts &&
      opts.creds &&
      opts.creds.username &&
      opts.creds.password &&
      opts.creds.email)
    if (err.code === 'EOTP') {
      res = await requestOTP()
    } else if (needsMoreInfo) {
      throw err
    } else {
      // TODO: maybe this needs to check for err.code === 'E400' instead?
      res = await addNewUser()
    }
  }

  const newCreds = {}
  if (res && res.token) {
    newCreds.token = res.token
  } else {
    newCreds.username = opts.creds.username
    newCreds.password = opts.creds.password
    newCreds.email = opts.creds.email
    newCreds.alwaysAuth = opts.creds.alwaysAuth
  }

  const usermsg = opts.creds.username ? ` user ${opts.creds.username}` : ''
  const scopeMessage = opts.scope ? ` to scope ${opts.scope}` : ''
  const userout = opts.creds.username ? ` as ${opts.creds.username}` : ''
  const message = `Logged in${userout}${scopeMessage} on ${opts.registry}.`

  log.info('login', `Authorized${usermsg}`)

  return {
    message,
    newCreds,
  }
}

module.exports = login


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
8 Apr 2026 7.02 AM
root / root
0755
legacy.js
2.388 KB
17 Mar 2026 6.55 AM
root / root
0644
oauth.js
0.148 KB
17 Mar 2026 6.55 AM
root / root
0644
saml.js
0.147 KB
17 Mar 2026 6.55 AM
root / root
0644
sso.js
2.379 KB
17 Mar 2026 6.55 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF