AxaFrance / oidc-client

Light, Secure, Pure Javascript OIDC (Open ID Connect) Client. We provide also a REACT wrapper (compatible NextJS, etc.).
MIT License
592 stars 160 forks source link

oidcClient.fetchWithTokens is using expired access token #1447

Closed Mikilll94 closed 1 month ago

Mikilll94 commented 2 months ago

Issue and Steps to Reproduce

After updating to latest version 7.22.24, there is a bug when access token is expired.

When access token is expired /token call is made but subsequent calls in my app are still using the expired access token.

I am not using service worker. Instead I am using oidcClient.fetchWithTokens for all my calls in the app.

Versions

7.22.24

Screenshots

Expected

oidcClient.fetchWithTokens should always use a valid access token.

Actual

oidcClient.fetchWithTokens is using expired access token.

Additional Details

This was working in my app in version 7.19.6

guillaume-chervet commented 2 months ago

O thank you @Mikilll94 , for this feedback ! I have reproduce it to fix it quickly!

guillaume-chervet commented 1 month ago

I think I have found the problem @Mikilll94 , I have to find a fix now ;]