Skip to content

Auth fails intermittently using token from context.octokit.auth({ type: 'installation' }) #1764

Answered by gr2m
dprothero asked this question in Q&A
Discussion options

You must be logged in to vote

When I say it works 99.9% of the time, I mean with the same repository that it it will occassionally fail with.

there might be a delay until a newly installation access token propagates to all read-only follower databases. For requests we take this into account and will do request retries for you:
https://github.com/octokit/auth-app.js/blob/d5bcdfc6a76a022a9bc82bcc974e4d33dfe3c9a4/src/hook.ts#L108-L114

But as you take the token out of octokit's control, you might run into a situation where an authentication fails because whatever instance is receiving your git requests does not yet have the installation access token.

I'd recommend to either make a poor-person's 5 second delay before you…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dprothero
Comment options

@gr2m
Comment options

Answer selected by dprothero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants