GitHub: Stale user token preventing builds from running (?) #2482
-
When using WP with GH, everything works fine for a short period of time (some hours) after being logged in freshly. However, it seems that after some time the user token expires and builds are not triggered anymore
This is especially problematic for CRON builds as these are never triggered then. Also the UI reflects this by showing the following banner A logout and fresh login solves the issue. I wonder: is this something that must be solved on the user side? Which token is actually used here which could expire? The GH auth runs via a self-hosted GH app which is using a client ID and secret. How is this being handled for the WP instance running in the woodpecker repo here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Actually, oauth2 tokens which are used for forge authentication are refreshed if a cron is executed. |
Beta Was this translation helpful? Give feedback.
The Woodpecker docs does not mention whether to create Woodpecker as a Github App or as an Oauth app.
It does not seem like tokens need to be refreshed, if installed as an Oauth app. The Github docs does not mention refreshing Oauth token https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app#implementing-persistent-authentication.