The Gately SDK provides multiple authentication methods to suit different use cases. From simple email/password to advanced SSO integration.

Authentication Methods

Gately offers several authentication options that you can configure through the dashboard:

Email/Password

Traditional email and password authentication with secure token management.
  • Standard login/signup flow
  • Password reset functionality
  • Email verification
  • Secure session management

Magic Link

Passwordless authentication using secure email links.
  • No passwords required
  • Secure email verification
  • Automatic session creation
  • User-friendly experience

Social Login

Login with popular social platforms.
  • Google OAuth
  • GitHub OAuth
  • Custom OAuth providers
  • Automatic profile sync

SSO Integration

Single Sign-On for enterprise users.
  • SAML 2.0 support
  • Custom OAuth providers
  • Enterprise authentication
  • Role-based access

Dashboard Configuration

Configure your authentication settings through the Gately dashboard:

Step 1: Choose Authentication Methods

  1. Go to SettingsAuthentication
  2. Enable the authentication methods you want to use
  3. Configure each method’s specific settings

Step 2: Customize Sign-up Fields

Choose what information to collect from new users:
  • Required Fields: Email, Password
  • Optional Fields: Name, Phone, Company, etc.
  • Custom Fields: Add your own fields
  • Validation Rules: Set field requirements

Step 3: Configure Social Logins

Set up social authentication providers:
  1. Google OAuth: Add Google Client ID and Secret
  2. GitHub OAuth: Add GitHub Client ID and Secret
  3. Custom OAuth: Configure custom providers
  4. SSO Setup: Configure SAML or custom SSO

Step 4: Email Settings

Configure email templates and settings:
  • Email Templates: Customize signup, login, and reset emails
  • Sender Information: Set your brand as the sender
  • Email Verification: Configure verification flow
  • Password Reset: Set up reset email flow

User Experience Settings

Customize how authentication works for your users:

Redirect Settings

  • Post-login redirect: Where users go after logging in
  • Post-signup redirect: Where new users are directed
  • Logout redirect: Where users go after logging out
  • Email verification redirect: Where users go after verifying email

Message Customization

  • Success messages: Customize login/signup success text
  • Error messages: Customize error messages
  • Email subjects: Customize email subject lines
  • Branding: Add your logo and colors

Security Settings

  • Password requirements: Set minimum password strength
  • Session duration: How long users stay logged in
  • Rate limiting: Prevent brute force attacks
  • IP restrictions: Limit access by IP address

Session Management

Gately automatically handles user sessions:

Automatic Features

  • Session persistence: Users stay logged in across visits
  • Token refresh: Automatic token renewal
  • Cross-device sync: Sessions work across devices
  • Secure storage: Encrypted session data

Session Settings

  • Session duration: Configure how long sessions last
  • Remember me: Allow extended sessions
  • Device management: Let users manage their devices
  • Security alerts: Notify users of suspicious activity

Password Reset

Allow users to reset their passwords securely:

Reset Flow

  1. User requests reset: User clicks “Forgot Password”
  2. Email sent: Secure reset link sent to user’s email
  3. User clicks link: User clicks link in email
  4. Set new password: User sets a new password
  5. Auto login: User is automatically logged in

Configuration

  • Reset email template: Customize the reset email
  • Link expiration: Set how long reset links are valid
  • Password requirements: Set new password rules
  • Security notifications: Alert users of password changes

Error Handling

Gately provides clear error messages for common issues:

Common Error Types

  • Invalid credentials: Wrong email/password
  • User not found: Email doesn’t exist
  • Email not verified: User needs to verify email
  • Rate limited: Too many attempts
  • Account locked: Account temporarily locked

Error Customization

  • Error messages: Customize error text
  • Error pages: Custom error page designs
  • Help links: Add links to support
  • Recovery options: Provide alternative solutions

Best Practices

User Experience

  • Keep authentication flows simple
  • Provide clear error messages
  • Use familiar UI patterns
  • Test the complete user journey
  • Monitor user feedback

Security

  • Enable email verification
  • Set strong password requirements
  • Configure rate limiting
  • Monitor for suspicious activity
  • Keep authentication methods updated

Testing Authentication

After configuring your authentication settings:
  1. Test each method: Try all enabled authentication methods
  2. Test error cases: Test with invalid credentials
  3. Test email flows: Verify email verification and reset
  4. Test social logins: Test all configured social providers
  5. Test on mobile: Ensure everything works on mobile devices

Troubleshooting

Next Steps