n4bb12 / verdaccio-github-oauth-ui

📦🔐 GitHub OAuth plugin for Verdaccio
https://verdaccio.org
MIT License
73 stars 45 forks source link

Can't authenticate with Enterprise github #123

Closed melkosoft closed 3 years ago

melkosoft commented 3 years ago

Bug Report

Versions

Version
node.js
verdaccio 4.11.3
verdaccio-github-oauth-ui (Plugin) latest
verdaccio-github-oauth-ui (CLI) latest

Expected behavior

I should be able to login in Verdaccio GUI after successful authentication in enterprise github.

Observed behaviour

Configured OAuth App in my github organization. Using clientid/secret and org name + github enterprise url configure verdaccio. Tried to login - got redirected to my corporate auth server, successfully authenticated there and got redirected to verdaccio with error: Access denied. Log shows this error: Access denied: User "my name" is not member of "my organization name". How it can be - on my profile->organization page I am an owner!!!

Steps to reproduce

Additional context

n4bb12 commented 3 years ago

Hi, maybe this is causing your issue:

Authorize the registry to access your GitHub user and org info. You only need to do this once. If your org is private, make sure to click the Request or Grant button to get read:org access when prompted to authorize. https://github.com/n4bb12/verdaccio-github-oauth-ui#verdaccio-ui

If your org is private, you need to specifically grant read permission to verdaccio in addition to logging in. You can do this once during login or in the GH settings if you missed it.

melkosoft commented 3 years ago

Sorry it was my stupid mistake - I misspell organization name....