tmail-flutter
tmail-flutter copied to clipboard
Fix mobile app force logout when notification enable in OIDC
Issue
- App more than 2 minutes (expired time)
- When enable notification + OIDC, app sometimes have forced logout
Root cause
- Because multiple requests are called at the same time. Because of using
QueueInterceptor
, requests are completed according to the FIFO principle. But because they are all called at the same time, the data in the request is still the old data (AuthorizationHeader). Therefore, when the first request gets the new token and uses it, the following requests will not be able to use this new token, leading to errors.
Solution
Perform verification for requests by checking:
- AuthorizationHeader
- Token Expired
This PR has been deployed to https://linagora.github.io/tmail-flutter/2751.
What is the user impact of this work?
What is the user impact of this work?
Mobile user need to go to login screen
.
- Right now, still not get any feedback on it, dev team found this
Because on CNB users complains that after some time, need to reinstall the application. I strongly suspect a refresh token handling issue on mobile...
Because on CNB users complains that after some time, need to reinstall the application. I strongly suspect a refresh token handling issue on mobile...
reinstall the application
? I think it should be login again, right? If so, IMO, it's related to the issue being fixed in this PR
I was not able to reproduce that myself but apparently they were not redirected back to the OIDC provider...
I was not able to reproduce that myself but apparently they were not redirected back to the OIDC provider...
you test on linagora or customer platform?
Does this affects CNB too ?
Well this might be the bug i encoutered friday...