Conversation
ec63816 to
03afe8f
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
Hmm, it might not be setting headers correctly on Android. I think I only tested upload on iOS. |
|
@mertalev, just let me know when I should try testing android again! |
|
@jfly Foreground backup is working on Android now for me, so it should be good for another round of testing. |
755e5ac to
6be2052
Compare
|
I also tried changing the client cert import to pick the cert from the OS store instead of importing a .p12 file directly. It should still work for certs that are already imported to the app, but any new imports will need to be added to the OS store first. Let me know how that feels to use! |
|
@mertalev , re:
Do you mean that adding to the OS store becomes the only supported way, or is it still an option to add the p12 file to the app manually? |
It becomes the only supported way. I'd rather avoid having two import flows for this. |
1a6242d to
c943d12
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
Hmm, it looks like there's a bug with how the headers are handled when the background tasks run. I have a hunch for what's causing that. |
This comment was marked as resolved.
This comment was marked as resolved.
|
@jfly I think both issues should be fixed as of the latest commits. |
|
Ok, I'm now running 68ace2b, will holler if I get logged out again, or run into any other issues! |
baee862 to
5318e5b
Compare
fix android
platform-side headers update comment consistent platform check tweak websocket handling support streaming
5318e5b to
c2ba1a7
Compare
c2ba1a7 to
58203eb
Compare
So far so good? |
|
Tangential— is there a TestFlight? As an mTLS user, this issue concerns me and I want to contribute testing. |
There's no TestFlight for this PR unfortunately. To test it, you would need to build and install the app locally with Xcode. |
Description
The app currently has fragmented auth and networking behavior, with configuration scattered across the app in the form of setting headers for individual API calls and websockets, creating clients per request and configuring each one, widgets having their own auth mechanism, each isolate needing to do all of this, and so on. This leads to a large surface area for these features with some things working and others being broken.
This PR moves API requests from a Dart client to a shared native client that is instantiated at startup. The overall goal is to consolidate configuration into a pre-configured client that handles everything, including mTLS, self-signed certificates, basic auth and custom headers. This client is then shared across the app, making these features more reliable and have lower maintenance burden as they work transparently.
An additional benefit to this is that the client leverages HTTP2/HTTP3, caching and multiplexing for improved performance, including for foreground upload. Moreover, these benefits extend across the app, meaning app extensions like widgets can get the same configuration for free.
The main remaining exceptions to this are asset downloading, background uploads and widgets, which don't use the same session yet. This can be addressed separately from this PR.
How Has This Been Tested?
Tested login, browsing, asset upload and websocket events on both platforms with and without mTLS, self-signed certificates and custom headers.