MerginMaps / mobile

Mobile app for Mergin Maps 📲. Open QGIS projects and manage vector data on your phone, even offline 📶 (Android/iOS/Windows app)
https://merginmaps.com
GNU General Public License v2.0
280 stars 62 forks source link

send uuid in HTTP request #3386

Closed PeterPetrik closed 2 months ago

PeterPetrik commented 2 months ago

Add GUID to each HTTP request and also show it in the diagnosis log. GUID is generated on first run or the app. We use X-Device-Id with uuid as custom header

github-actions[bot] commented 2 months ago

Pull Request Test Coverage Report for Build 8875858600

Details


Files with Coverage Reduction New Missed Lines %
input/app/projectsmodel.cpp 1 69.17%
input/core/merginuserinfo.cpp 3 72.99%
input/app/inputhelp.cpp 15 36.36%
input/core/coreutils.cpp 19 86.39%
input/app/appsettings.cpp 34 72.32%
input/app/main.cpp 58 32.75%
input/core/merginapi.cpp 250 78.49%
<!-- Total: 380 -->
Totals Coverage Status
Change from base Build 8843206479: 0.03%
Covered Lines: 7658
Relevant Lines: 12752

💛 - Coveralls
tomasMizera commented 2 months ago

The implementation looks good, let's see where to add it

mostlyAtNight commented 2 months ago

Hi @PeterPetrik ,

Regarding how to send it, I would also be fine with it going in its own header, we should be able to accomodate that in the backend. This SE page may be useful for how to name a new one if we cannot find something appropriate to put it into.

Re the implementation itself, I have a question. I assume the UUID is automatically generated when the app is installed - is it subsequently readable and editable by the user? If so, I'm not sure this would be wise and I would instead opt for it to be stored in scoped storage or similar so it's protected from editing/cloning.

PeterPetrik commented 2 months ago

Looks like non standart headers might be blocked by firewall, what name you suggest?

Re implementation, only way how to reset it for user easily is to really remove the app completely and install from scratch.

PeterPetrik commented 2 months ago

@varmar05 can you please secure server implementation? thanks