fix: tv browser sign in

This commit is contained in:
edde746
2026-01-26 15:26:27 +01:00
parent 1f8dccbba7
commit 8332ef8b9f
+5 -1
View File
@@ -158,7 +158,11 @@ class _AuthScreenState extends State<AuthScreen> {
// Open browser (in-app for mobile, external for desktop)
final uri = Uri.parse(authUrl);
if (await canLaunchUrl(uri)) {
await launchUrl(uri, mode: LaunchMode.inAppBrowserView);
// On TV, use inAppWebView (simpler WebView) instead of Chrome Custom Tabs
final mode = PlatformDetector.isTV()
? LaunchMode.inAppWebView
: LaunchMode.inAppBrowserView;
await launchUrl(uri, mode: mode);
} else {
throw Exception(t.errors.couldNotLaunchUrl);
}