2026-05-08 13:06:38 +05:00
|
|
|
import { useEffect } from 'react';
|
|
|
|
|
import { View, ActivityIndicator } from 'react-native';
|
2026-05-08 03:53:51 +05:00
|
|
|
import * as WebBrowser from 'expo-web-browser';
|
2026-05-08 13:06:38 +05:00
|
|
|
import { router } from 'expo-router';
|
2026-05-08 03:53:51 +05:00
|
|
|
|
2026-05-08 13:06:38 +05:00
|
|
|
// Complete the browser auth session so WebBrowser.openAuthSessionAsync returns
|
2026-05-08 03:53:51 +05:00
|
|
|
WebBrowser.maybeCompleteAuthSession();
|
|
|
|
|
|
|
|
|
|
export default function AuthCallback() {
|
|
|
|
|
useEffect(() => {
|
2026-05-08 13:06:38 +05:00
|
|
|
// The actual code exchange is handled in auth.tsx via openAuthSessionAsync
|
|
|
|
|
// This page only shows briefly if opened directly; redirect to auth
|
|
|
|
|
const t = setTimeout(() => {
|
|
|
|
|
router.replace('/auth');
|
|
|
|
|
}, 500);
|
|
|
|
|
return () => clearTimeout(t);
|
2026-05-08 03:53:51 +05:00
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
2026-05-08 13:06:38 +05:00
|
|
|
<View style={{ flex: 1, backgroundColor: '#07071a', alignItems: 'center', justifyContent: 'center' }}>
|
|
|
|
|
<ActivityIndicator color="#4361ee" size="large" />
|
2026-05-08 03:53:51 +05:00
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
}
|