Skip to main content
Magic links provide passwordless authentication by sending a secure login link to the user’s email.

Parameters

Example

React Component

How It Works

  1. User enters their email
  2. SDK sends request to Gately API
  3. Gately sends email with secure link
  4. User clicks link in email
  5. Link redirects to your app with auth token
  6. SDK automatically logs user in

Email Template

The magic link email includes:
  • Your project name/branding
  • Login button with secure link
  • Link expiry notice (default: 1 hour)
  • Security notice
Customize the email template in Settings > Email > Templates. Magic links expire after 1 hour by default. If a user clicks an expired link:
  • They see an error message
  • They’re prompted to request a new link

Security

Magic links are:
  • Single-use (invalidated after first use)
  • Time-limited (expire after 1 hour)
  • Cryptographically signed
  • Tied to specific email address

New vs Existing Users

Error Handling

Rate Limiting

Magic link requests are rate limited to prevent abuse:
  • 3 requests per email per 10 minutes
  • 10 requests per IP per 10 minutes

Combining with Password Login

Offer both options for flexibility: