Skip to main content

Email + Password Authentication

Email/password is the traditional authentication method. Users create an account with their email and a password they choose.
Consider your use case. For subscription apps with paywalls, anonymous auth often converts better. Email auth adds friction before users see your app’s value.

Overview

Email authentication is the simplest to set up:
  1. Supabase Dashboard — Enable Email provider (usually already enabled)
  2. Your App — Use the pre-built forms and auth functions
Time required: ~10 minutes

Part 1: Supabase Configuration

Enable Email Provider

1

Open Auth settings

Go to your Supabase project dashboardNavigate to Authentication → Providers
2

Check Email is enabled

Find Email in the listIt should be enabled by default. If not, toggle it on.

Configure Email Settings (Optional)

1

Open Email Templates

Go to Authentication → Email Templates
2

Customize templates

You can customize:
  • Confirm signup — Email sent when user signs up
  • Reset password — Email sent when user requests password reset
  • Magic link — Email for passwordless login (if enabled)
Each template supports variables like {{ .ConfirmationURL }}

Security Settings (Optional)

Go to Authentication → Settings to configure:

Part 2: App Configuration

Step 1: Enable in App Config

Update config/app.config.ts:

Step 2: Use Auth Functions

The kit provides these email auth functions in lib/auth.ts:

Step 3: Use Pre-built Screens

Navigate to the auth screens:

Using the Components

Login Form

Signup Form

Forgot Password Form


Email Verification Flow

When email confirmation is enabled (recommended for production):
  1. User signs up with email/password
  2. Supabase sends confirmation email
  3. User clicks link in email
  4. User is verified and can sign in

Handling Unverified Users


Customizing the Input Component

The kit includes a reusable AuthInput component:

Combining with Social Auth

You can offer both email and social authentication:

Error Handling

Common errors and how to handle them: The LoginForm and SignupForm components handle these automatically.

Testing

In Development

  1. Sign up with a real email you can access
  2. Check your inbox for the confirmation email
  3. Click the link to verify
  4. Sign in with your credentials

Test Accounts

For testing without real emails, you can:
  1. Disable email confirmation in Supabase (development only)
  2. Use Supabase’s Inbucket for local email testing

Next Steps

Apple Sign In

Add social sign-in with Apple

Google OAuth

Add social sign-in with Google