Authentication Issues
Login/Signup Not Working
Invalid Project ID
Invalid Project ID
Problem: Authentication fails with “Invalid project ID” error.Solutions:
- Verify your project ID in the Gately dashboard
- Check that you’re using the correct environment (dev/staging/prod)
- Ensure the project ID is a valid UUID format
CORS Errors
CORS Errors
Problem: Cross-origin request blocked errors in browser console.Solutions:
- Add your domain to allowed origins in the Gately dashboard
- Ensure you’re using HTTPS in production
- Check if you’re testing from
localhost
vs127.0.0.1
Network Connectivity
Network Connectivity
Problem: Network errors or timeouts during authentication.Solutions:
- Check internet connection
- Verify firewall settings
- Test API connectivity directly
Session Management Issues
User Not Persisting
User Not Persisting
Problem: User session doesn’t persist across page reloads.Solutions:
- Check if cookies are enabled in browser
- Verify localStorage is available
- Ensure you’re not in incognito/private mode
Token Expiration
Token Expiration
Problem: User gets logged out unexpectedly.Solutions:
- Enable auto-refresh in SDK options
- Handle token refresh manually
- Check token expiration times
SSO Issues
OAuth Popup Problems
Popup Blocked
Popup Blocked
Problem: OAuth popup is blocked by browser.Solutions:
- Use redirect mode as fallback
- Ensure popup is triggered by user action
- Add popup blocker detection
OAuth Configuration
OAuth Configuration
Problem: OAuth provider returns configuration errors.Solutions:
- Verify OAuth app settings in provider dashboard
- Check redirect URIs are correctly configured
- Ensure client ID and secret are correct
Mobile SSO Issues
Mobile Popup Issues
Mobile Popup Issues
Problem: OAuth popups don’t work well on mobile devices.Solutions:
- Always use redirect mode on mobile
- Detect mobile devices and adjust accordingly
UI Control Issues
Elements Not Showing/Hiding
Element Not Found
Element Not Found
Problem: UI control methods don’t work because element doesn’t exist.Solutions:
- Ensure element exists in DOM before setting up controls
- Use proper element IDs
- Check timing of control setup
Controls Not Working
Controls Not Working
Problem: UI controls are set up but elements don’t show/hide correctly.Solutions:
- Check authentication state
- Verify control options
- Debug CSS conflicts
React Integration Issues
Hook Not Working
Hook Returns Null
Hook Returns Null
Problem:
useGately
hook returns null values.Solutions:- Check project ID is correct
- Ensure hook is used inside component
- Verify React version compatibility
Infinite Re-renders
Infinite Re-renders
Problem: Component re-renders infinitely when using the hook.Solutions:
- Avoid creating new objects in render
- Use proper dependency arrays
- Memoize callback functions
Performance Issues
Slow Authentication
Multiple SDK Instances
Multiple SDK Instances
Problem: Creating multiple SDK instances causes performance issues.Solutions:
- Create single SDK instance
- Use context or global state
- Implement proper singleton pattern
Unnecessary API Calls
Unnecessary API Calls
Problem: Too many API calls slowing down the application.Solutions:
- Cache user data appropriately
- Use loading states to prevent duplicate calls
- Implement request deduplication
Development Environment Issues
Local Development
Localhost vs 127.0.0.1
Localhost vs 127.0.0.1
Problem: Authentication works on localhost but not 127.0.0.1 or vice versa.Solutions:
- Add both localhost and 127.0.0.1 to allowed origins
- Use consistent URL format
- Check browser cookie settings
Hot Reload Issues
Hot Reload Issues
Problem: Authentication state lost during hot reload in development.Solutions:
- This is expected behavior in development
- Test in production build for accurate behavior
- Use development-specific handling if needed
Error Debugging
Enable Debug Logging
Network Debugging
Getting Help
Before Contacting Support
- Check the Console: Look for error messages in browser developer tools
- Verify Configuration: Double-check project ID and domain settings
- Test in Incognito: Rule out browser extension conflicts
- Try Different Browser: Check if issue is browser-specific
- Check Network: Verify internet connection and firewall settings
Information to Include
When contacting support, include:- Project ID (without sensitive data)
- Browser and version
- Operating system
- Error messages from console
- Steps to reproduce the issue
- Expected vs actual behavior