
Prerequisites
Before beginning the setup, ensure you have:-
A registered domain (mandatory)
- Purchase a domain through providers like GoDaddy, Namecheap, or Google Domains
- This is required as Resend needs a verified domain to send emails
- You cannot proceed without a registered domain
-
A Supabase project
- If you haven’t set up Supabase yet, refer to our Supabase Setup guide
Domain verification is mandatory for Magic Link functionality. Do not proceed
with the setup until you have a registered domain ready to use.
Setup Process
1. Email Provider Configuration
Launchtoday uses Resend as the default SMTP provider due to its excellent deliverability rates and modern API. The setup process begins with creating your Resend account and configuring your domain. First, visit Resend to create your account. Once logged in, you’ll need to navigate to the Resend Integrations page where you’ll find the Supabase integration option. Before proceeding with the integration, you’ll need to verify your domain with Resend. Domain verification is a crucial step that ensures secure email delivery. Head to the Resend Domains section and add your domain. Resend will provide you with specific DNS records that need to be added to your domain configuration. After adding these records, wait for the verification process to complete - this typically takes a few minutes but can sometimes take longer depending on DNS propagation. Once your domain is verified, you can proceed with the Supabase integration. Return to the Resend Integrations page and click “Connect to Supabase”. You’ll be guided through a series of steps to authorize API access and select your organization. During this process, you’ll need to configure your sender details, including:- A sender name that will appear in email clients
- A sender email address using your verified domain
2. Supabase Configuration
The Resend-Supabase integration streamlines the setup process by automatically configuring most SMTP settings in your Supabase project. The integration sets up the following parameters:

3. Implementation in Your App
The Magic Link implementation is already set up in your Launchtoday application. Here’s a breakdown of the key components and their functions:- Magic Link Authentication Function (view in Github):
- Deep Link Handler (view in Github):
- User requests a Magic Link by entering their email
- User receives and clicks the link in their email
- App captures the incoming link and extracts the authentication token
- Token is verified and used to establish a session
- User’s authentication state is updated in the app
Security Considerations
Implementing Magic Links requires careful attention to security measures to protect your authentication system. Start by configuring appropriate token expiration times in your Supabase dashboard. Navigate to Authentication > Providers > Email and set the Email OTP Expiration - we recommend one hour as a balanced duration between security and user convenience.
-
Using Supabase’s built-in rate limiting UI: Navigate to Authentication > Rate Limits and configure limits for sign-in attempts and email requests.
- Using database policies: Create custom rate limiting rules by implementing Supabase policies directly in your database.
Testing Your Implementation
Testing your Magic Link implementation should cover both development and production environments. During development, run your application usingyarn ios:simulator
or yarn android
and test the complete authentication flow.
Alternative Email Providers
While Launchtoday recommends Resend for its excellent deliverability and easy integration with Supabase, you may have requirements that necessitate using a different email provider. Popular alternatives include SendGrid, Amazon SES, or your own SMTP server. If you choose to use an alternative provider, you’ll need to configure the following in your Supabase dashboard:- SMTP Host: Your provider’s SMTP server address
- Port Number: Usually 465 for SSL or 587 for TLS
- Username: Your SMTP authentication username
- Password: Your SMTP authentication password
- Sender Email: A verified email address from your domain
- Sender Name: The name that will appear in email clients