n4bb12 / verdaccio-github-oauth-ui

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

Auth Token from npx verdaccio-github-oauth-ui expiration #199

Closed blasco closed 1 month ago

blasco commented 1 month ago

Is there away to control the expiration time of the generated token? Or how should the token be generated to prevent its expiration? I'm using this token to publish packages in a github action, but it seems that the token expires after a couple of days. I generate it via:

npx verdaccio-github-oauth-ui --registry

I can't find in the documentation how to identify in a CI setup. Is there a recommended approach?

n4bb12 commented 1 month ago

Token formats and durations are goverened by Verdaccio. Take a look at

blasco commented 1 month ago

According to the documentation the tokens do not expire. I'm deploying verdaccion in google cloud run, so my guess is that when the container is shut down, the logged in user tokens are lost... Is there a way to log in via cli? currently I'm ussing npx verdaccio-github-oauth-ui --registry, but that opens the web browser to log in, is there another method to log in that could be performed in a ci environment? Thank you for the support!

n4bb12 commented 1 month ago

According to the documentation the tokens do not expire.

?

2024-06-04 13_53_39-Configuration File _ Verdaccio

is there another method to log in that could be performed in a ci environment

This plugin performs an OAuth Authorization Code Flow which is inherently interactive and browser-based, and requires redirecting through GitHub. That is the whole and sole purpose of this plugin. If you want a non-interactive way of signing in, best use a different plugin.

blasco commented 1 month ago

As far as I understood, the jwt is not the default behaviour, the default one does not use jwt and do not expire. Maybe I'm missing something