verdaccio-openid-connect

Verdaccio authentication plugin for OpenID Connect. When installed, npm login --registry ... command will open the browser to start login flow.

Usage no npm install needed!

<script type="module">
  import verdaccioOpenidConnect from 'https://cdn.skypack.dev/verdaccio-openid-connect';
</script>

README

verdaccio-openid-connect

Verdaccio authentication plugin for OpenID Connect. When installed, npm login --registry ... command will open the browser to start login flow.

Installation

npm i -g verdaccio-openid-connect

Configuration

auth:
  openid-connect:
    # Verdaccio public URL. If served on a subpath, make sure to include a
    # trailing slash.
    publicUrl: http://localhost:4873/
    # Redis hostname
    redisUri: redis
    # OpenID Connect Issuer URL
    issuer: https://keycloak/auth/realms/MyRealm/
    # OpenID Connect Client ID
    clientId: verdaccio
    # OpenID Connect Client Secret
    clientSecret: '...'
    # Optional id_token claim that will be used for username
    usernameClaim: preferred_username

OpenID Connect Client must be configured to allow ${publicUrl}/oidc/callback as a redirect URI.