JavaScript SDK: React reference
Reactive authentication state for React: a context provider, hooks and conditional wrappers.
6 分 読み取り·レベル 参照·2026/10/12 に改訂
このページはまだお使いの言語では利用できません。英語で表示されます。
この英語のテキストはフランス語のオリジナルから自動的に生成されたもので、まだレビューされていません。
#
機能
Exported functions
| Function | Description |
|---|---|
function AuthProvider({ client, children, initialSession }: AuthProviderProps): unknown | Wraps your application to provide reactive Aurabase authentication context. |
function useAuth(): AuthContextValue | Access the core Aurabase authentication state and actions. |
function useUser(): User | null | Returns the currently authenticated user, or null if unauthenticated. |
function useSession(): Session | null | Returns the current active session. |
function SignedIn({ children }: { children: ReactNode; }): unknown | Conditional component rendering children only when a user is signed in. |
function SignedOut({ children }: { children: ReactNode; }): unknown | Conditional 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.
最終更新日 · 2026/10/12