-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Expiration time' claim ('exp') must be a numeric value representing the future time at which the assertion expires #135
Comments
Are you using the latest version of this package. I'm sure I already fixed this in 10.0.2? |
The only other thing I can think of that would be causing this is not running |
@GrahamCampbell |
Is the exception coming from this line?
|
Yes, it is
|
Right, so that would indicate that this is not a bug in this package, but instead, an issue in |
valid point, sorry about that, i'll follow up on |
Hi @GrahamCampbell, |
This also happens to me on nextjs api routes. |
Ah, interesting. You are both using Lambda, I think, based on the path in the stack. I think what is going wrong is that you are re-using the same connection after the JWT has expired. I wonder if we can re-work things so that the JWT is lazy (re-)generated, rather than being generated at connection instantiation, and then held for the lifetime of the Lambda. Probably that kind of refactor would need a new major release. |
Are you actually making a new connection each time, or are you doing it once, and then re-using it? |
I already fixed it, I swapped out the token:
|
@flavio-paqt i don't know how that helps or changes things |
@matthewnessworthy you can draw a bit of inspiration from here octokit/auth-app.js#146 (actual fix here octokit/auth-app.js#164), a quick dirty fix can be to try to catch the RuntimeException if it's related to an expired Expiration time' claim ('exp') then manually regenerate the token (see inside vendor/graham-campbell/github/src/Auth/Authenticator/PrivateKeyAuthenticator.php) and finally resend the request using this newly generated token |
PHP version: 8.0.11
Description
I (occasionally) get the following error when attempting to authenticate as an app
How to reproduce
Additional context
I am acting as the app installation, but perhaps I am going about it in the wrong way and there is a way to authenticate as an app installation already built in
The text was updated successfully, but these errors were encountered: