Skip to content

Commit

Permalink
fix scope param missing from token response
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Feb 2, 2025
1 parent 7686d12 commit d8acec6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions authentik/providers/oauth2/views/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ def create_code_response(self) -> dict[str, Any]:
response = {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down Expand Up @@ -710,6 +711,7 @@ def create_refresh_response(self) -> dict[str, Any]:
"access_token": access_token.token,
"refresh_token": refresh_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand All @@ -736,6 +738,7 @@ def create_client_credentials_response(self) -> dict[str, Any]:
return {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down Expand Up @@ -767,6 +770,7 @@ def create_device_code_response(self) -> dict[str, Any]:
response = {
"access_token": access_token.token,
"token_type": TOKEN_TYPE,
"scope": " ".join(access_token.scope),
"expires_in": int(
timedelta_from_string(self.provider.access_token_validity).total_seconds()
),
Expand Down

0 comments on commit d8acec6

Please sign in to comment.