Deployment

Authentication

Configure your authentication to work on production.

Supabase needs a few settings to be configured in their Dashboard to work correctly.

This guide will walk you through the steps to get your Supabase authentication set up in your Production environment. The dev environment does not require any configuration.

It's important!

Skipping this step will result in your users not being able to log in or sign up.

Authentication URLs

The first thing you need to do is to set the authentication URLs in the Supabase Dashboard. These URLs are used to redirect users to the correct page after they have logged in or signed up.

  1. Go to the Supabase Dashboard.
  2. Click on the project you want to use.
  3. Go to the Authentication tab.
  4. Click on URL Configuration.
  5. Add your website URL to the Site URL field. This is the URL of your TurboStarter site (e.g. https://my-app.com).
  6. Add your redirect URLs to the Redirect URLs field. This is the URL of your TurboStarter site with /api/auth/callback appended to it (e.g. https://my-app.com/api/auth/callback).

Failure to set these URLs will result in your users not being able to log in or sign up.

Third party providers

The configuration is done on Supabase's side - not on TurboStarter's side.

Third Party providers need to be configured, managed and enabled fully on the provider's and Supabase's side. TurboStarter does not need any configuration (beyond setting the provider to be displayed in the UI).

Please read Supabase's documentation on how to set up third-party providers.

Auth hooks

Make sure to set the auth hooks to your production project. This will allow you to send authentication emails to your users.

Check Authentication emails for more information.

Custom SMTP

As we're using custom auth hook to send emails via our API, there is no need to set up a custom SMTP in Supabase.

Troubleshooting

If you are having authentication issues, ensure that the Site URL and Redirect URLs are correct. If you are using a custom domain, ensure that you are using the correct domain in the Site URL and Redirect URLs.

Check Authentication troubleshooting for more cases and solutions.

If something is still not working, please open a support ticket with any useful information (such as server logs).

Last updated on

On this page

Ship your startup everywhere. In minutes.Get TurboStarter