Unpublish fails with custom auth plugin
See original GitHub issueIn the latest version the npm unpublish
fails when a custom auth plugin is attached. If I remove this.plugins.push((0, _authUtils.getDefaultPlugins)());
it works.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:26 (12 by maintainers)
Top Results From Across the Web
Authentication error on publishing to private NPM repository ...
When you do npm login or npm adduser the NPM client creates an authentication token that will be used in future request to...
Read more >Custom Authentication With Kong - DEV Community
This post presents a step by step to create a plugin with authentication using an external service. This solution is used when exists ......
Read more >Publishing Extensions - Visual Studio Code
Learn how to publish Visual Studio Code extensions to the public Marketplace and share them with other developers.
Read more >Authentication - Verdaccio
The authentication is tied to the auth plugin you are using. The package restrictions are also handled by the Package Access.
Read more >Publish plugins to the Figma Community
Note: You need to have two-factor authentication enabled to publish plugins, including publishing updates to existing plugins.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue on my side, appears that allow_unpublish in auth.ts lookup around plugin without waiting for response. It means each auth plugin will be asked for unpublish and the first to respond will win, but others will still generate callback call. after that unpublish on storage side will be called multiple time and result on a 403 on the second attemps.
https://github.com/verdaccio/verdaccio/blob/7b67bea4b8ec5de29ffc04b1f99c9d041c14ac57/src/lib/auth.ts#L208-L217
publish is coded in a different way and has no issues : https://github.com/verdaccio/verdaccio/blob/7b67bea4b8ec5de29ffc04b1f99c9d041c14ac57/src/lib/auth.ts#L246-L261
and as @xpepermint , removing default plugin fix the issue.
Thanks, I’ll try to test it this week.