Skip to main content
Supabase offers multiple sign-in methods to authenticate users. Choose the method that best fits your application’s needs.

Password Sign In

Authenticate users with email and password:
Passwordless authentication via email:
React Magic Link Component

Phone/SMS Sign In

Authenticate with phone number and OTP:
Phone authentication requires configuring an SMS provider in your Supabase dashboard under Authentication > Settings > Phone Auth.

Session Management

Get Current Session

Get Current User

Refresh Session

Auth State Changes

Listen for authentication events:

Sign Out

End the user session:

Sign Out from All Devices

Complete Sign-In Form

React Sign-In Component

Password Recovery

Send password reset email:
Update password:

Error Handling

Common sign-in errors:

Security Best Practices

Supabase automatically rate limits sign-in attempts. Configure limits in Authentication > Settings > Rate Limits.
Sessions expire after 1 hour by default. Supabase automatically refreshes tokens if the user is active.
Always use HTTPS in production. Supabase sets secure, httpOnly cookies automatically.

Next Steps

OAuth Sign In

Add social login providers

Multi-Factor Auth

Enhance security with MFA