-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MSAL] Settings Sync logs out after a few hours #229456
Comments
Can you include the Window & Microsoft authentication logs as well? I'm gonna loop in @sandy081 to help out understanding the Settings Sync stuff |
Window: https://gist.github.com/winstliu/183e19bbdec127752e47723fc8da1796 (it's verbose) |
@sandy081 any progress here? I'm still continuously getting logged out. |
Sandeep and I will sit down soon to discuss these MSAL related bugs. My suspicion is that Settings Sync is keeping track of the id of a session, rather than the account being used with Settings Sync. The session id is suppose to be different every time a token is refreshed but the account should stay the same. |
Please fix this |
@TylerLeonhardt Given the latest improvements in auth and settings sync areas, Should we ask user to try insiders and see if the issue can be still reproducible? Or do you think these changes are not related to this issue? |
@sandy081 I don't think those changes were related to this issue and this should be investigated |
Indeed, this is still happening on 0c9dd26 |
@TylerLeonhardt I believe following logging explains why settings sync is logging out
My suspicion is that when the token fails for the first time, workbench tries to refresh the token (requesting auth service for sessions) and I believe the token that is given back is not refreshed and probably the same token. Therefore, when workbench tries to sync again it fails again and Settings Sync logs out to prevent recursive invalid auth requests. @winstliu Can you please share the window log again when this happens again? This might help in prove the theory. |
@winstliu Also share the settings sync log. Over all following logs needed
|
I think I found the issue... @sandy081 your analysis really helped! PR sent. |
and force expiration in a similar way to the way MSAL does it for access tokens. Fixes #229456
Omg... I think I figured this one out for real this time. In some places we use Talking with MSAL folks, apparently The solution is to manually check the expiration of the idtoken and refresh it if it's close. |
Appreciate your persistence here, but it looks like it's still something else :( As usual, let me know which logs would be helpful. |
logs would be helpful. Trace level.
|
Window: https://gist.github.com/winstliu/ecc822a8bb9f55067b5797abea252430 (I believe this might be truncated, I'm pretty sure I enabled Settings Sync at 12:30) |
I am able to repro only on the broker side... I wonder if my fix doesn't work in the broker scenario. That would be really sad... |
Confirmed... the broker flow does not support |
Looks like the Broker doesn't support `forceRefresh`... This is an alternative way of forcing a refresh. Fixes #229456
Alright @winstliu ... my fingers are crossed. Tomorrow will tell... let me know how it goes, and please do attach logs again if you see the issue (I added another log statement). |
Yes, this seems to be fixed!!! Thanks 😁 |
FINALLY 😭 |
Does this issue occur when all extensions are disabled?: Didn't try without extensions because this is a multi-hour repro and I need to stay productive, sorry!
Version: 1.94.0-insider (user setup)
Commit: 1926933
Date: 2024-09-23T05:12:01.964Z
Electron: 30.5.0
ElectronBuildId: 10198947
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
Steps to Reproduce:
https://gist.github.com/winstliu/b858f9e8f600301676a04cdd3f16f3cb
The text was updated successfully, but these errors were encountered: