Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set id_token if not in refresh response #628

Open
6 tasks done
wryrye opened this issue Aug 1, 2024 · 1 comment
Open
6 tasks done

Don't set id_token if not in refresh response #628

wryrye opened this issue Aug 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@wryrye
Copy link

wryrye commented Aug 1, 2024

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(), 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

  1. Make a refresh request (req.oidc.accessToken.refresh()) where the response is missing an id_token
  2. Confirm subsequent accesses of req.oidc.idToken and req.oidc.user yield undefined

Additional context

Similar fix in another repo: authts/oidc-client-ts#688

express-openid-connect version

^2.16.0

Express version

^4.18.2

Node.js version

20.12.1

@wryrye wryrye added the bug Something isn't working label Aug 1, 2024
@wryrye
Copy link
Author

wryrye commented Aug 13, 2024

Tagging @stevenwong-okta since you seem to be active!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant