Version: @gately/react@2.2.0
Features:
Features:
useGately hook, GatelyProvider context, TypeScript support, SSR supportInstallation
Quick Start
GatelyProvider
Wraps your app to provide authentication context. Must be a parent of any component usinguseGately.
useGately Hook
The main hook — provides all auth state and methods.State
Methods
Authentication Examples
Login Form
Sign Up
Magic Link
Route Protection
With React Router
User Profile
Other Hooks
useAuth
Returns the full auth context (same asuseGately):
useUser
Focused hook for user profile data:useProtected
Simple auth status check:TypeScript
Testing
Next Steps
Next.js SDK
Add server-side auth and middleware
Node.js SDK
Backend token verification