goauthentik / authentik

The authentication glue you need.
https://goauthentik.io
Other
7.82k stars 598 forks source link

Missing custom scopes in JWT (M2M) #9995

Open adepto-io opened 1 month ago

adepto-io commented 1 month ago

version: Authentik 2024.4.2

I've managed to get a JWT by following the steps described in static authentication but none of my custom scopes are included. The provider's JWT payload preview does list them for that service account. Is this intended behavior or did I miss something?

BeryJu commented 1 month ago

You need to both have the scopes selected in the provider (which it looks like you do), and also pass them as part of the token request

adepto-io commented 1 month ago

I found out that in Authentik's source there is a parameter 'scope' that's used to request the required scopes. This is not documented, is it?

BeryJu commented 1 month ago

It isnt explicitly documented in our example docs, however it is part of the OAuth RFC