The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
import { createContext, useContext } from 'react'
export type AuthData = {
claims?: Record<string, any> | null
profile?: any | null
isLoading: boolean
isLoggedIn: boolean
}
export const AuthContext = createContext<AuthData>({
claims: undefined,
profile: undefined,
isLoading: true,
isLoggedIn: false,
})
export const useAuthContext = () => useContext(AuthContext)