We are integrating only office with our micro-service app and hence all calls go thorough our gateway and have to be authenticated ( there is also multi-tenancy

). Since our frontend uses session cookies we can't use that when receiving calls from only office, instead we generate a token and add it to the urls we pass in the only office config ( i.e callbackUrl: "
https://app/notify?access_token=xyz" ). So this token is valid for some time and we need to be able to refresh it when its about to expire.
My question is it possible to do that without recreating the editor with new configuration, basically it boils down to replacing the editorConfig.callbackUrl and document.url at runtime. If not what is the recommended why to work through a gateway reverse proxy with authentication?
My current best solution is a blocking pop-up that the session is about to expire and then recreating the editor with fresh configuration, but if we can do it behind the scenes would be superb.