Skip to content

Instantly share code, notes, and snippets.

@bjollans
bjollans / App.tsx
Last active April 29, 2024 05:53
Minimal version to get Google Sign in working with Supabase on IOS in React Native with Expo. If you are not using Expo, follow the setup guide of `react-native-app-auth` instead of using `rn-app-auth-plugin.js` and `app.json`.
import { Session } from '@supabase/supabase-js';
import supabase from './util/supabase';
import { useEffect, useState } from 'react';
import AuthForm from './components/AuthForm';
export default function App() {
const [session, setSession] = useState<Session | null>(null)
useEffect(() => {
supabase.auth.getSession().then(({ data: { session } }) => {