I am working mostly offline with very slow internet. How can I configure Qfield to remain logged in. When the session has expired the value of cloud_username is empty.
Imported from GitHub discussion by @rosaguilar on 2024-03-12T08:17:27Z
I am working mostly offline with very slow internet. How can I configure Qfield to remain logged in. When the session has expired the value of cloud_username is empty.
Imported from GitHub discussion by @rosaguilar on 2024-03-12T08:17:27Z
Hey rosaguilar . Thanks for reporting this issue, find it as an issue here: QFieldCloud variables not available when QField is started and automatic login is not yet done · Issue #5116 · opengisch/QField · GitHub
The problem is that cloud_username
and cloud_email
are only available when the user has successfully logged in. As a special present to you, I have prepared a PR that should fix your issue, please try the APKs from Add the ability to use `cloud_username` and `cloud_email` in offline by suricactus · Pull Request #5117 · opengisch/QField · GitHub . For any further discussion, please move it to #5116 .
As for the original question how to remain QField users to remain logged in, there is no configuration for QField, but the cloud server. You can increase the session token expiration. It is by default configured to be 30 days. If you use local QFieldCloud installation, check the setting QFIELDCLOUD_AUTH_TOKEN_EXPIRATION_HOURS
in your settings.py
. On app.qfield.cloud the session will expire in 720 hours or 30 days:
Imported from GitHub comment by @suricactus on 2024-03-21T22:36:05Z
Thank you so much for explaining where to set up and fixing the issue. You guys rock!
Imported from GitHub comment by @rosaguilar on 2024-03-22T09:38:18Z