Authentication

Authentication guide for your application.

BuilderHack uses Supabase for authentication. Supabase provides a complete user management system, including sign-up, login, and password recovery. Here we have Magic Links, which allow users to log in without a password. Instead, they receive a link via email that logs them in automatically. So you'll need to set up your Supabase project and configure the authentication settings.

Setup

By default the Sign In / Providers should be already configured for you to use. So go to Authentication > Configuration > Sign In / Providers.

Please check if it's allowing new users to sign up, confirm email and email is selected as an Auth Provider.

Supabase Authentication

Now it's time to get the keys, head over to the Project Settings > API Keys and get the anon public key.

Lastly, got to Project Settings > Data API and get the Project URL.

Supabase API Key

These values should stored in the following environment variables:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=

And that's it. Now you should be already able to sign in / sign up your users. Upon sign in, users will receive a Magic Link via email that allows them to log in without a password. In that email they'll receive a link that will redirect them to the dashboard once the authentication is complete.