Access dynamic variable created in js (backstage.io) from a React component level file [closed]

Team A is using backstage.io an inside ../services/app/packages/backend/src/modules/auth.js they are creating microsoft token, modify this token adding some values and issuing as backstage (they are not able to provide me publick key to validate signature, don’t ask.), hence i need to catch and pass variable with microsoft token (before they modify this, yes i can change auth.js file) to my React component so during fetch (which is going through backstage proxy plugin) i could pass my microsoft token catched from auth.js as Authorization.
I have tried process.env , module.export etc. all of them are giving me undefined value from React component level and that is understandable because React env values are build on start of app.

Is there any possibility i could do this or only using token issued by them is possible