-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Bug description
Authentik endpoint /application/o/token/ seems to be returning the value of a refresh token "expires_in" instead of the access token's.
The application using authentik's SSO capabilities is relying on "expires_at" to refresh the access token proactively. Because information received is incorrect, it won't try to refresh until the token is expired and fail on a request when the access token did expire.
steps to reproduce:
0. (Set-up) Set Access token validity to 6m, refresh token to 14d.
- Request new token by querying the URL (can be done from the browser):
https://authentik/if/flow/default-provider-authorization-explicit-consent/?response_type=code&client_id=5e6f645d1836e5f696b31fc136a5dde1f734f73f&redirect_uri=_REDIRECT_URI_&scope=SCOPE - Copy the code
- Request token through Postman using the code above
- Result:
"expires_in": 1209600(e.g. 14d).

Confirmed that the token itself also contains wrong information:

Expected behavior
The Access token should return a validity of 360s for validity set to 6m.
Version and Deployment (please complete the following information):
- authentik version 2022.11.3
- Deployment: docker
Additional context
This was claimed to be resolved under commit #3306003, but the issue still persists with the latest update of Authentik - confirmed as of Dec 9th, 2022.