feat(app): the native app signs in at the web login and carries the session on its socket and downloads

This commit is contained in:
2026-10-23 19:51:43 +01:00
parent d6fbea1665
commit 2fc0a4394b
13 changed files with 335 additions and 1 deletions
@@ -1,6 +1,7 @@
import 'dart:io';
import 'dart:typed_data';
import '../../../core/session/server_session.dart';
import 'artifact_viewer_fetch.dart';
/// Native fetch for an already resolved same-origin artifact.
@@ -12,6 +13,8 @@ Future<ArtifactFetchResult> fetchArtifact(Uri uri) async {
try {
final request = await client.getUrl(uri);
request.followRedirects = false;
// A phone behind the web login carries its kept session.
ServerSession.headers.forEach(request.headers.set);
final response = await request.close();
final bytes = BytesBuilder(copy: false);
await for (final chunk in response) {