Overview
The Gately SDK provides a comprehensive set of APIs for authentication, user management, and UI control. This reference covers all available methods, their parameters, return values, and usage examples.Core Classes
GatelyBrowserClient
Main client class for browser environments with OAuth and UI control support
React Hook
useGately hook for reactive authentication state in React applications
Quick Reference
Authentication Methods
State Management
User Management
UI Control
Error Handling
All SDK methods throw errors that can be caught and handled:Common Error Codes
Wrong email/password combination
User doesn’t exist in the system
Email address not verified
Too many authentication attempts
Connection or network issues
TypeScript Support
The SDK includes full TypeScript support with comprehensive type definitions:Environment Support
The SDK works across different environments:- Browser: Full feature support including OAuth and UI control
- Node.js: Server-side authentication and user management
- Edge Runtime: Lightweight authentication for edge functions
- React Native: Mobile authentication support