question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unpublish fails with custom auth plugin

See original GitHub issue

In 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

7reactions
lamilsagecommented, Feb 12, 2020

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.

3reactions
DanielRufcommented, Jan 9, 2020

Thanks, I’ll try to test it this week.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found