Logo Aurabase
aurabazadokumenty
dokumenty›Odniesienie do pakietu SDK JavaScript›React reference

JavaScript SDK: React reference

Reactive authentication state for React: a context provider, hooks and conditional wrappers.

6 min przeczytane·Poziom odniesienie·Zmieniono 12 paź 2026
Ta strona nie jest jeszcze dostępna w Twoim języku. Jest pokazany w języku angielskim.
Ten tekst w języku angielskim został wygenerowany automatycznie na podstawie francuskiego oryginału i nie był jeszcze recenzowany.
#
Funkcje

Exported functions

FunctionDescription
function AuthProvider({ client, children, initialSession }: AuthProviderProps): unknownWraps your application to provide reactive Aurabase authentication context.
function useAuth(): AuthContextValueAccess the core Aurabase authentication state and actions.
function useUser(): User | nullReturns the currently authenticated user, or null if unauthenticated.
function useSession(): Session | nullReturns the current active session.
function SignedIn({ children }: { children: ReactNode; }): unknownConditional component rendering children only when a user is signed in.
function SignedOut({ children }: { children: ReactNode; }): unknownConditional component rendering children only when NO user is signed in.
Generated page

This page is generated from the type declarations and comments of the SDK, so it cannot drift from the published code. For worked examples, read the guides.

Ostatnia aktualizacja · 12 paź 2026