fix(android): add deep link handler to intercept zeavisedu:// URLs and navigate WebView
Login-page won't auto-process token on deep link return because the WebView stays on the page it was on. Added setupDeepLinkHandler() which listens for zeavisedu:// scheme URLs and navigates the WebView to the correct path+query. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import { MainLayout } from "@/components/layout/main-layout";
|
||||
import { useEffect } from "react";
|
||||
import { useAuthStore } from "@/store/auth-store";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
import { setupDeepLinkHandler } from "@/lib/tauri";
|
||||
|
||||
function LogoutProses() {
|
||||
const setUser = useAuthStore((state) => state.setUser);
|
||||
@@ -161,6 +162,11 @@ function GlobalErrorTracker() {
|
||||
}
|
||||
|
||||
export function App() {
|
||||
// Register deep link handler for Android OAuth return
|
||||
useEffect(() => {
|
||||
setupDeepLinkHandler();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AuthInitializer />
|
||||
|
||||
Reference in New Issue
Block a user