GitHub now has a mechanism where it returns an access_token that expires in 8 hours and a refresh_token that's good for 6 months that you can use to get a fresh access token. See https://docs.github.com/en/developers/apps/building-github-apps/refreshing-user-to-server-access-tokens.
GitHub now has a mechanism where it returns an access_token that expires in 8 hours and a refresh_token that's good for 6 months that you can use to get a fresh access token. See https://docs.github.com/en/developers/apps/building-github-apps/refreshing-user-to-server-access-tokens.