-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
适配 npm v9 的命令数据更新 #348
Labels
enhancement
New feature or request
Comments
实现 login with web |
npm login
|
这样看来好像得先有一个 web 登录界面😭 |
哈哈,外网应该不需要,内网直接跳登陆服务回来直接转发就好( |
@MondoGao 哈哈,不是所有私有部署都会包装一下 npm 的,很多还是直接使用 npm 修改 registry 来使用。 |
使用 authing.cn 的能力,结合 tegg 的 module 能力,做一个 authing module。 |
npm http fetch POST 200 https://registry.npmjs.org/-/v1/login 893ms
npm verb web auth got response {
npm verb web auth loginUrl: 'https://www.npmjs.com/login?next=/login/cli/xxxxx,
npm verb web auth doneUrl: 'https://registry.npmjs.org/-/v1/done?sessionId=xxx'
npm verb web auth }
npm verb web auth opening url pair
Login at:
https://www.npmjs.com/login?next=/login/cli/xxxxxxx
Press ENTER to open in the browser...npm http fetch GET 202 https://registry.npmjs.org/-/v1/done?sessionId=npm_*** 268ms
npm http fetch GET 202 https://registry.npmjs.org/-/v1/done?sessionId=npm_*** 268ms
npm http fetch GET 202 https://registry.npmjs.org/-/v1/done?sessionId=npm_*** 266ms |
fengmk2
added a commit
that referenced
this issue
Jan 22, 2023
elrrrrrrr
pushed a commit
that referenced
this issue
Feb 21, 2023
npm v9+版本的login请求体已经没有hostname参数了,见npm-profile源码。WebAuthController中的LoginRequestRule是不是应该调整成这样比较好? const LoginRequestRule = Type.Object({
// cli 所在机器的 hostname,NPM9+开始去掉
hostname: Type.Optional(Type.String({ minLength: 1, maxLength: 100 })),
}); |
可以来一个 pr 修复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.blog/changelog/2022-10-24-npm-v9-0-0-released/
login and adduser are now separate commands that send different data to the registry.
login with web
check doneUrl
The text was updated successfully, but these errors were encountered: