Hi, I was wondering if there's a possibility to ge...
# talk-hydra
f
Hi, I was wondering if there's a possibility to get the _granted_scopes_ populated in the token hook. The example in the docs shows it populated but when I try the list is empty.
m
Hello @flaky-solstice-4750 Can you please link the example you are referring to?
f
https://www.ory.sh/docs/hydra/guides/claims-at-refresh#webhook-payload In particular the request:
{
"request": {
"client_id": "app-client",
"granted_scopes": [
"offline",
"openid",
*`"hydra."`
],
"granted_audience": [],
"grant_types": [
"authorization_code"
],
"payload": {}
}
}
No matter what I have my consent app set _grant_scope_ to, they do not pop up in the token hook request.
@magnificent-energy-493 Do you have any more info in how I could get _grant_scope populated?_
m
Hey David, how are you running Ory OAuth2? Using Ory Network or self-hosted? Did you enable it?
f
Self hosted on kubernetes, though I do have the same behavior if I run it locally via docker-compose. Granted_scopes is never populated in a regular auth-code flow that I start with
hydra perform authorization-code
The same behavior has been described in this thread: https://ory-community.slack.com/archives/C012RBW0F18/p1690467589213779
m
Hmm not sure what the issue is. The scopes should work as expected. I can test it out on my project with an example webhook. Would you mind sharing your hydra config here?
f
It can be reproduced with the 5min tutorial. Attached is the hydra config I've used for it. My token hook simply logs the request. In those logs I can see that granted_scopes is always empty.