0

I have a React application where I am using oidc-client.js for the login flow. I am using the code flow where I will first receive the authorisation code and with which I'll be fetching the token using the oidc client js. I need to pass an authorization header in the request made by the library, but the library doesn't support that. I need to intercept the request and add an authorization basic. I tried with axios interceptor but it's not getting intercepted. Please help!!

Severus
  • 61
  • 1
  • 4

1 Answers1

0

Only if you couldn't find any better solution: it is possible to intercept the XMLHttpRequest calls directly.

Here you can see how others are doing: Intercept XMLHttpRequest and modify responseText

mr.Kame
  • 153
  • 3
  • 12