Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including verdaccio-github-oauth-ui with all npm packages installed. Try it out:

require("verdaccio/package.json"); // verdaccio is a peer dependency. var verdaccioGithubOauthUi = require("verdaccio-github-oauth-ui")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

verdaccio-github-oauth-ui v1.7.3

📦🔐 Verdaccio GitHub OAuth UI

A GitHub OAuth Plugin for Verdaccio – https://www.verdaccio.org

Version License Issues CircleCI Dependencies LGTM

About

The plugin is similar to verdaccio-github-oauth, but also changes the UI login behaviour. When clicking the login button, instead of filling in a login form, you are asked to log in with GitHub.

In case you need CLI support for automation purposes, the plugin is also compatible with sinopia-github-oauth-cli.

Install

$ npm install verdaccio-github-oauth-ui

Configuration

Verdaccio Config

Merge the below options with your existing Verdaccio configuration:

middlewares:
  github-oauth-ui:
    client-id: $GITHUB_OAUTH_CLIENT_ID # required
    client-secret: $GITHUB_OAUTH_CLIENT_SECRET # required

auth:
  github-oauth-ui:
    org: $GITHUB_OAUTH_ORG # required, people within this org will be able to auth

The values for client-id and client-secret can either be an environment variable name or the value itself.

GitHub Config

When creating the OAuth app at https://github.com/settings/developers, the callback URL should be:

YOUR_REGISTRY_URL/-/oauth/callback

If url_prefix is specified in the Verdaccio config then it must match the YOUR_REGISTRY_URL.

How to Login

Verdaccio

Click the login button and login at GitHub, if not already logged in.

Authorize the registry. Important: When using a private GitHub org, make sure to click the Request button for read:org access. See #5.

After successful login and authorization, you're redirected back to the verdaccio registry.

Command Line

To set up authentication with the registry in your npm CLI, you'll need to run the commands shown in the header:

To verify that the authentication token is set up correctly, run the following command:

$ npm whoami --registry YOUR_REGISTRY_URL
n4bb12

If you see your GitHub username, you are ready to start publishing packages.

Unless the token is revoked by you in the GitHub settings, it never expires.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free