oidc-client-ts
oidc-client-ts copied to clipboard
refresh_token_expires_in missing
Good afternoon, Calling the IdP /token (grant_type: authorization_code), I receive this attribute in the response:
refresh_token_expires_in: 3600
I cannot find this attribute in the repo source code and this attribute is lost in the oidc:user session storage.
Is there a reason for this attribute to be ignored by the library?
Thank you
This library supports OAuth2.0/OIDC standard, which defines expires_in for access tokens. See https://openid.net/specs/openid-connect-core-1_0.html#CodeNotes.
The expires_in for refresh tokens is not yet implemented...
BTW: Which IDP are you using?
Looks like there is no refresh_token_expires_in in the OAuth2 standard defined...
I guess it's a Microsoft specificity https://learn.microsoft.com/en-us/linkedin/shared/authentication/programmatic-refresh-tokens
refresh_token_expires_in — The number of seconds remaining until the refresh token expires. Refresh tokens usually have a longer lifespan than access tokens.
It would be quiet easy, what i do not like is that is not part of the spec...
similar to expires_in in must be added in these files:
- https://github.com/authts/oidc-client-ts/blob/a3dcd7e05f6d12713f5a1e1762f4feffab14cc60/src/SigninResponse.ts#L70-L82
- https://github.com/authts/oidc-client-ts/blob/a3dcd7e05f6d12713f5a1e1762f4feffab14cc60/src/User.ts#L82-L93