Add one-time token login flow and deep-link handling

This commit is contained in:
Adolfo Reyna
2026-02-21 21:28:05 -05:00
parent fe293828e6
commit f9d4457b5a
4 changed files with 116 additions and 4 deletions
+3 -1
View File
@@ -12,6 +12,8 @@ export default function App({ navigation, route }) {
useEffect(() => {
getData = async () => {
const tokenFromRoute = typeof route?.params?.token === "string" ? route.params.token.trim() : "";
if (tokenFromRoute) return;
let r = await API.isLoggedIn();
if (r) {
await API.logout();
@@ -22,7 +24,7 @@ export default function App({ navigation, route }) {
return () => {
}
}, []);
}, [route?.params?.token]);
return (
<SafeAreaView style={styles.container}>