From 602d4bd4a6c5123d39dd6396029623718cc6b8f3 Mon Sep 17 00:00:00 2001 From: Himanth Reddy Date: Thu, 23 Jul 2026 14:12:15 +0530 Subject: [PATCH] fix(web): eliminate /login redirect loop and update auth redirect URI --- netlify-arvio-tv-site/index.html | 6 +++--- netlify-arvio-tv-site/netlify.toml | 2 +- web/app/login/page.tsx | 9 ++------- web/components/login/LoginScreen.tsx | 2 +- web/components/settings/SettingsScreen.tsx | 2 +- web/lib/store.tsx | 9 ++++++++- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/netlify-arvio-tv-site/index.html b/netlify-arvio-tv-site/index.html index d9cfb46cf..c09ad3037 100644 --- a/netlify-arvio-tv-site/index.html +++ b/netlify-arvio-tv-site/index.html @@ -2244,7 +2244,7 @@ Dashboard - Web app + Web app Get ARVIO @@ -2731,7 +2731,7 @@

ARVIO Web: every other screen.Browsers only decode a limited set of formats — true for every web streamer. Most sources play directly (use the "Browser playable" filter); heavy 4K HEVC, Dolby Vision and REMUX releases, lossless audio and some Live TV providers don't. That's what the one‑tap "Open in VLC" button is for: it hands the stream to VLC on iPhone, iPad, Android, macOS and Windows (one‑time one‑click setup), which plays everything. The app has none of these limits — its native player decodes it all. @@ -2806,7 +2806,7 @@

From fresh install to a synced TV home.

diff --git a/netlify-arvio-tv-site/netlify.toml b/netlify-arvio-tv-site/netlify.toml index 95a0b7390..11485e451 100644 --- a/netlify-arvio-tv-site/netlify.toml +++ b/netlify-arvio-tv-site/netlify.toml @@ -3,7 +3,7 @@ [[redirects]] from = "/app" - to = "https://web.arvio.tv/login" + to = "https://web.arvio.tv" status = 302 force = true diff --git a/web/app/login/page.tsx b/web/app/login/page.tsx index e81f8f1e5..a2e928918 100644 --- a/web/app/login/page.tsx +++ b/web/app/login/page.tsx @@ -1,10 +1,5 @@ -import { AppShell } from "@/components/shell/AppShell"; -import { AppProvider } from "@/lib/store"; +import { redirect } from "next/navigation"; export default function LoginPage() { - return ( - - - - ); + redirect("/"); } diff --git a/web/components/login/LoginScreen.tsx b/web/components/login/LoginScreen.tsx index 44ad01f7d..c1d60830a 100644 --- a/web/components/login/LoginScreen.tsx +++ b/web/components/login/LoginScreen.tsx @@ -12,7 +12,7 @@ export function LoginScreen() { const redirectToAuthPortal = () => { if (typeof window === "undefined") return; - const redirectUri = window.location.origin + "/login"; + const redirectUri = window.location.origin + "/"; const portalUrl = getAuthPortalUrl(); window.location.href = `${portalUrl}?redirect_uri=${encodeURIComponent(redirectUri)}`; }; diff --git a/web/components/settings/SettingsScreen.tsx b/web/components/settings/SettingsScreen.tsx index c94daf949..9e59d8b37 100644 --- a/web/components/settings/SettingsScreen.tsx +++ b/web/components/settings/SettingsScreen.tsx @@ -1010,7 +1010,7 @@ function AccountsSection() { const cloudConfigured = hasNetlifyBackendConfig() || hasSupabaseConfig(); const redirectToAuthPortal = () => { - const redirectUri = window.location.origin + "/login"; + const redirectUri = window.location.origin + "/"; window.location.href = `${getAuthPortalUrl()}?redirect_uri=${encodeURIComponent(redirectUri)}`; }; diff --git a/web/lib/store.tsx b/web/lib/store.tsx index 8913d3782..095c1a649 100644 --- a/web/lib/store.tsx +++ b/web/lib/store.tsx @@ -3,6 +3,7 @@ import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; import { getStreams, getStreamsProgressive, installAddon as installAddonManifest, loadLocalAddons, normalizeAddons, saveLocalAddons } from "./addons"; import { AuthClient, SESSION_KEY, decodeJwtPayload } from "./auth"; +import { getAuthPortalUrl } from "./config"; import { defaultCatalogs, mergeCatalogs } from "./catalogs"; import { getContinueWatching, pullCloudPayload, pullCloudProfiles, pullCloudTraktToken, pullCloudWatchlist, saveCloudAddons, saveCloudProfiles, saveCloudSettings, saveCloudTraktToken } from "./cloud"; import { cachedDebridDirectUrl, parseDebridStream, resolveDebridDirectUrl, resolveTranscodeStream } from "./debrid"; @@ -1540,7 +1541,13 @@ export function AppProvider({ setView("profiles"); }, []); - const goToLogin = useCallback(() => setView("login"), []); + const goToLogin = useCallback(() => { + if (typeof window !== "undefined") { + const redirectUri = window.location.origin + "/"; + const portalUrl = getAuthPortalUrl(); + window.location.href = `${portalUrl}?redirect_uri=${encodeURIComponent(redirectUri)}`; + } + }, []); const backToProfiles = useCallback(() => setView("profiles"), []); const value = useMemo(() => ({