mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES Reworks Expo React native social to use appropriate auth methods and restructures to use external code. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
18 lines
383 B
TypeScript
18 lines
383 B
TypeScript
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)
|