-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Some times after close the App the session is closed #223
Comments
I noticed something else in slow connections, both phones, same version of both, that I get logged out like this:
And I can keep going like this in loop for a while. cc: @garethbowen is this something for v1.1.0 of CHT-Android? |
Just for tracking, similar case was resolved recently. |
If the session expiry in couchdb is set to 1 year then this should only happen after 1 year of inactivity, right? If so, it makes sense that this is coming up in development, but it shouldn't happen in production often. Do you have a fix in mind? Should we explicitly call flush when login is successful for example? |
Just in case, I remember Alex saying that this session setting is configurable , and i-tech-malawi wanted to make it shorter, I sent a question in app-services channel to see if any project has sorter sessions.
No yet sorry, I haven't had the time to debug and brainstorm possible solutions. I'm wondering if this is actually in CHT-Core side instead of CHT-Android 🤔 |
I-tech-malawi -> They are still discussing about shortening the session, evaluating the value for strengthening user account security. They haven't made the change yet. |
Their biggest use case is:
|
Very cool. The session cookie is configurable so that should just work. The thing we'll need to confirm is what happens to the userctx cookie which is currently hardcoded to 1 year. If the second user is offline do we rely on the userctx cookie and just log them in as the first user? |
Tested in gamma as offline user, no connection. When the session cookie expires, the userctx cookie remains there as expected, the chw can keep using the app normally with that user, and if navigating to login page, then the chw gets redirected to webapp and keep using the app. |
This happens only some times, and specially if the user force-close the app: instead of returning back to the last URL seeing or to the default URL, the app redirects to the login page.
Discussing this in another issue (#52), this is one theory that may be the reason for the error (#52 (comment)):
The text was updated successfully, but these errors were encountered: