docs / sdks/react
React SDK
Accessible authentication components and client hooks for React 19.
VulyoProvider
VulyoProvider loads the public application configuration and current session, supplies redirects and localization, and gives every Vulyo component access to the same auth state.
| Property | Purpose |
|---|---|
| publishableKey | Identifies the Vulyo application instance. |
| proxyUrl | Points client operations to your compatible backend adapter. |
| afterSignInUrl | Default destination after a successful sign-in. |
| afterSignUpUrl | Default destination after a successful sign-up. |
| appearance | Applies shared visual customization. |
| localization | Overrides supported interface strings. |
Hooks
| Hook | Use it for |
|---|---|
| useAuth() | Loading state, signed-in state, and refreshing the session. |
| useUser() | Reading the current user. |
| useVulyo() | Advanced access to configuration, navigation, and authenticated requests. |
import { useAuth, useUser } from "@vulyo/react";export function AccountSummary() { const { isLoaded, isSignedIn } = useAuth(); const { user } = useUser(); if (!isLoaded) return <span>Loading…</span>; if (!isSignedIn) return <span>Signed out</span>; return <span>{user?.email}</span>;}Routing
By default, Vulyo changes pages with window.location.assign(). Pass navigate when your router provides client-side navigation.
<VulyoProvider publishableKey={publishableKey} proxyUrl="/api/vulyo" navigate={(to) => router.navigate(to)}> {children}</VulyoProvider>