n4bb12 / verdaccio-github-oauth-ui

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

Question: Authenticating from a github actions workflow #135

Closed andreparodi-bandai closed 2 years ago

andreparodi-bandai commented 2 years ago

Hi,

I have configured the github oauth plugin and it's working well allowing me to restrict access to users of my org.

What I would like to do now is to setup the publishing of an artifact to happen from a github actions workflow. So basically I would like to configure a authToken as a secret which would then be used by the publishing action.

As far as I can see the authToken generated by the oauth process changes whenever the verdaccio server is restarted. So this is a "temporary" token that will expire and hence is not very usable for automation.

I was wondering if anyone has a similar issue. Github workflows get injected a github_token. Is there a way to use that to authenticate with verdaccio? Alternatively I was thinking that maybe I can configure htpasswd in addition to github-oauth-ui and have a basic authentication with a non-expiring token via htpasswd.

Any advice welcome. Thanks for great plugin! Andre

andreparodi-bandai commented 2 years ago

I've manage to resolve this by adding my "automation" users in htpasswd. Will close this issue.