feat: add auth

This commit is contained in:
Max Koon
2025-10-12 16:03:28 -04:00
parent 0446893a67
commit b4d13e6a9f
17 changed files with 657 additions and 281 deletions

18
app/index.tsx Normal file
View File

@@ -0,0 +1,18 @@
import { ThemedText } from '@/components/themed-text';
import { SafeAreaView } from 'react-native-safe-area-context';
import { authClient } from '@/lib/auth-client';
import { Button } from 'react-native';
export default function HomeScreen() {
const { data } = authClient.useSession();
const onLogout = () => {
authClient.signOut();
}
return (
<SafeAreaView>
<ThemedText>Hello {data?.user.name}</ThemedText>
<Button onPress={onLogout} title="Logout" />
</SafeAreaView>
);
}