azure-quantum-python
azure-quantum-python copied to clipboard
Add back the SharedTokenCacheCredential to handle token which is cached by the InteractiveBrowserCredential
The original problem: the InteractiveBrowserCredential required login by browser on each new run.
Observations:
It seems that the InteractiveBrowserCredential is able to save its token to persistent cache storage, but it is not able to use that cache later. ( It actually has its own method _acquire_token_silent, but, as far as I can see, it does not check for token in cache, but already expects an instance of the AuthenticationRecord class, which, I assume, we have to handle and store manually)
That's why I also made an assumtion that we should use SharedTokenCacheCredential for that. I know that the SharedTokenCacheCredential was previously removed by @vxfield and there might be a valid reason for that, but I haven't found any better workaround, so I would glad to hear whether we can use it or not.