Login With Email
Overview#
Setting up Email logins for your Supabase application.
- Add Email authenticator to your Supabase Project
- Add the login code to your application - JavaScript | Flutter
Configure email settings#
- For Site URL, enter the final (hosted) URL of your app.
- For Auth Providers, enable email provider.
Self hosting
For self-hosting, you can update your project configuration using the files and environment variables provided. See the self-hosting docs for details.
Add login code to your client app#
When your user signs in, call signInWithPassword() with their email address and password:
_10async function signInWithEmail() {_10 const { data, error } = await supabase.auth.signInWithPassword({_10 email: 'example@email.com',_10 password: 'example-password',_10 })_10}
When your user signs out, call signOut() to remove them from the browser session and any objects from localStorage:
_10async function signOut() {_10 const { error } = await supabase.auth.signOut()_10}