Per OpenID Connect Core 1.0 specifications, a successful refresh response "might not contain an id_token". This is the case for my setup.
Therefore, when I call AccessToken.refresh(), the id_token is set to undefined, which corrupts the session and forces me to re-authenticate. I'm almost certain this is the same issue encountered in #279.
Can we avoid setting id_token to undefined if the value is not present in the refresh response?
Reproduction
Make a refresh request (req.oidc.accessToken.refresh()) where the response is missing an id_token
Confirm subsequent accesses of req.oidc.idToken and req.oidc.user yield undefined
Checklist
Description
Per OpenID Connect Core 1.0 specifications, a successful refresh response "might not contain an id_token". This is the case for my setup.
Therefore, when I call
AccessToken.refresh()
, theid_token
is set toundefined
, which corrupts the session and forces me to re-authenticate. I'm almost certain this is the same issue encountered in #279.Can we avoid setting
id_token
toundefined
if the value is not present in the refresh response?Reproduction
req.oidc.accessToken.refresh()
) where the response is missing anid_token
req.oidc.idToken
andreq.oidc.user
yieldundefined
Additional context
Similar fix in another repo: https://github.com/authts/oidc-client-ts/issues/688
express-openid-connect version
^2.16.0
Express version
^4.18.2
Node.js version
20.12.1