-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
oauth2: investigate panic #512
Comments
Here is the log I get (maybe could help)
|
Looks like the session isn't properly instantiated, I'll write a failing test case first |
@kimooz are you using the SQL backend? |
Yes a Postgres DB |
Ok because I just tried to write a failing test case for this using the memory manager and it didn't result in an error. |
What hydra version are you on? How are you starting the image? Is this a fork? Are you by any chance working together with @wyattanderson ? I can't reproduce this issue with the demo set up, refreshing a refresh token works totally fine here. To resolve this, I need to know what you're doing. Please give as much detail as possible. |
@kimooz can you please include at least 10 lines of the log before the panic? |
No I am not :) I agree that it works because this only happened to me twice in 3 weeks! I will attach more info once it happen again sorry :s |
@kimooz do you have a custom consent endpoint? Is this endpoint setting, for example, id token or access token data? |
We're not working together, but this is the same stack trace I was seeing. I haven't yet had time to put together a reproducer, but my setup:
|
@wyattanderson are you setting |
only id_ext for me |
@kimooz is id_ext always set? e.g. are all requests openid connect? |
Yes all requests with authorization flow uses openid scope and the consent includes id_ext |
Ok so it's improbable that this is the root cause of the issue, because if it was, the error would happen more frequently, right? |
The Error happens if the access token is expired and I am using the refresh token endpoint to refresh it. However if the Access Token is still valid I can refresh without any errors! |
Are you by any chance flushing expired access tokens from the database? |
No I don't, Didn't know that Hydra already provides a tool for that :) |
It doesn't, just trying to narrow the scope ;) |
kimooz @wyattanderson if this happens again, could you please share the log + ~50 previous lines, plus (if possible) the payload of the consent response? This is now blocking for the 1.0.0 release because panics are not nice. |
@arekkas It just happened again!!
|
Thank you! Could you share the consent payload as well? |
|
you are not asking for actual values right? :) |
user.as_json is just some json object right? |
yes it is just a normal json object nothing special in it |
I can not reproduce this. Please check that you have the most recent tag installed. |
Since you're apparently on the latest version, please create a reproducible step-by-step guide that includes your whole environment (including consent app), otherwise it's just random guessing by me |
Seems that the issue is caused by the id_ext. if the id_ext in the consent response contains a nested object like organisation in the following example
The panic bug occurs and even more the refreshed access token loses the subject! I am using Hydra 0.9.6 (complied from source) with PostgreSQL 9.6 |
No description provided.
The text was updated successfully, but these errors were encountered: