Skip to content

WIP: Setup authentication

Alexandre Beaudoin edited this page Mar 2, 2017 · 2 revisions

Requirements:

  • proget-universal-bower-resolver version 0.5.0 and above.

Setup

  1. Run the command npm adduser --registry=<your proget server address>/npm/
  2. Enter your credentials by following the instructions.
  3. That's all.

Why use the NPM authentication?

First of all, the chance that your npm feeds also use authentication is high if you use authentication for your universal ProGet feeds. So it may be already configured.

Seconds, this simplifies password management since it allows you to setup your password at the same place in one shot.

Finally, NPM already implement authentication, Bower normally relies on Git to do the authentication part.

Trap (also a little thought on authentication problem with private Bower feeds on ProGet)

ProGet add authentication to access normal Bower feeds if you force authentication everywhere. This resolver will not help to authenticate you for those feed, only universal ones. If you hit yourself to this problem, you have two choices:

  1. Setup your .bowerrc search feed by adding your user authentication at the start of the URL. The ProGet help show you this way, and it gives an URL that looks like this: http://<user>:<password>@<server>/bower/<feed>. Personally, this is ugly, you have your user and password in clear (npm using base64 to encrypt is a little cleaner) somewhere on your computer and if you need to add that information in a project .bowerrc, you have your password spread all over the people who can access it.

  2. You don't activate the authentication for your Bower feeds. Doing that, you let Git handle the authentication part, a thing that Git already done well. The only bad side of this solution is that, everybody will be able to see the information ProGet show about your Bower package, but only the people who can access it will be able to access the code.

  3. You stop using Bower feed on ProGet and transfers all to Universal packages. Doing that, you get rid of all the disadvantage Bower feed cause by their nature.