npm Enterprise allows you to log in to your private registry and website using a GitHub Enterprise OAuth2 Client.
Note: the specialized Github Enterprise Integration supports both authentication and authorization, and may be a better solution depending the type of authorization you have enabled for GitHub Enterprise.
To get up and running with GitHub Enterprise SSO, follow these simple steps:
There are two basic steps to server-side configuration: creating an OAuth client in GitHub Enterprise, and configuring authentication in npm Enterprise.
- login to your GitHub Enterprise appliance.
- Click on Settings, OAuth Applications, Register a new OAuth application.
Fill in the requested information:
Application Name: npm Enterprise.
Homepage URL: URL of your npm Enterprise website.
Authorization callback URL:
npm.mycompany.com:8081is the address your npm Enterprise website.
Create the application and take note of the values
Client ID, and
In another browser tab, go to the
/settings page of the npm Enterprise admin console (port
Under Authentication, select OAuth2 and enter the following values:
|Config Field||Config Value|
|Client ID||Paste value from GitHub Enterprise|
|Client Secret||Paste value from GitHub Enterprise|
|Redirect URI||Enter the same value you gave to GitHub Enterprise when creating client credentials, e.g., ```http://npm.mycompany.com:8081/auth/oauth2/callback```|
Click Save to save these settings and then Restart now (when prompted) to restart the appliance and apply these settings.
That's all the server-side configuration you need!
Client login using SSO behaves differently than other authentication mechanisms, see Single Sign-On Authentication.