mrlannigan / verdaccio-github-oauth-ui

πŸ“¦πŸ” GitHub OAuth plugin for Verdaccio

Home Page:https://www.verdaccio.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“¦πŸ” Verdaccio GitHub OAuth UI

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

CircleCI LGTM Dependencies Version License Issues

About

When clicking the login button, instead of filling in a login form, you are asked to log in with GitHub.

The plugin is similar to verdaccio-github-oauth but also changes the UI login behaviour.

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

The plugin requires the following additional 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 where the value is stored, or the value itself.

When creating the OAuth app at github.com, use

REGISTRY_URL/-/oauth/callback

as the callback URL.

If url_prefix is specified in the config then it must be equal to the REGISTRY_URL.

Usage

  • Click the login button and follow the OAuth flow.

    When using a private GitHub org, make sure to click the [Request] button for org read access. See #5.

  • After successful login, the npm config commands that set up authentication with the registry are shown at the top.

  • To verify that the authentication token is set up correctly, run

    npm whoami --registry REGISTRY_URL
    

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

  • Unless the token is revoked on GitHub, it is infinitely valid.

About

πŸ“¦πŸ” GitHub OAuth plugin for Verdaccio

https://www.verdaccio.org

License:MIT License


Languages

Language:TypeScript 84.0%Language:Shell 14.1%Language:CSS 1.8%