AxaFrance / oidc-client

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

Headers are not injected when Posting data to server (v4.0.0) #702

Closed TeckTn closed 2 years ago

TeckTn commented 2 years ago

Issue and Steps to Reproduce

When a Post is triggred by the application, the access_token is correctly injected by the background service worker, but not other headers like Accept and Content-Type so I got Http 415 (unsupported media type) error message when the api is expecting to get application/json.

Versions

v4.0.0

Expected

Original request Headers are set in the POST request.

Actual

Only authorize header is set with the correct access_token

Additional Details

Tested on Edge 98

Packages :

"@axa-fr/react-oidc-context": "^4.0.0-beta.9", "react": "^17.0.2", "react-dom": "^17.0.2", "react-router": "6.2.1", "react-router-dom": "6.2.1",

TeckTn commented 2 years ago

Same issue in v4.0.0