From 883ac103f81d914f6f2331af846f9d4198491923 Mon Sep 17 00:00:00 2001 From: Beto <43630417+betomoedano@users.noreply.github.com> Date: Mon, 15 Dec 2025 12:14:42 -0600 Subject: [PATCH] fix: android redirect (#25888) * fix android redirect * remove logs --- companion/app/oauth/callback.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/companion/app/oauth/callback.tsx b/companion/app/oauth/callback.tsx index 6fc5089fc1..ea5207021d 100644 --- a/companion/app/oauth/callback.tsx +++ b/companion/app/oauth/callback.tsx @@ -1,12 +1,20 @@ import React, { useEffect } from "react"; import { View, Text, ActivityIndicator, Platform } from "react-native"; import { useRouter, useLocalSearchParams } from "expo-router"; +import { useAuth } from "../../contexts"; export default function OAuthCallback() { const router = useRouter(); const params = useLocalSearchParams(); + const auth = useAuth(); useEffect(() => { + if (Platform.OS === "android") { + if (auth.userInfo) { + router.replace("/(tabs)"); + } + } + if (Platform.OS !== "web") return; // Extract code, state, and error parameters from URL