Ctrl K
Browse documentation

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.

PropertyPurpose
publishableKeyIdentifies the Vulyo application instance.
proxyUrlPoints client operations to your compatible backend adapter.
afterSignInUrlDefault destination after a successful sign-in.
afterSignUpUrlDefault destination after a successful sign-up.
appearanceApplies shared visual customization.
localizationOverrides supported interface strings.

Hooks

HookUse 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.
account-summary.tsx
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.

vulyo-provider.tsx
<VulyoProvider  publishableKey={publishableKey}  proxyUrl="/api/vulyo"  navigate={(to) => router.navigate(to)}>  {children}</VulyoProvider>