SaasAble Documentation
Admin - V1.2.0
Admin - V1.2.0
  • Getting started
    • Prerequisites
    • Setup
    • Deployment
  • Development
    • Guards
      • Auth Guard
      • Guest Guard
      • Role Guard
    • Folder Structure
    • Routing
    • Menu
    • Env Variables
    • API Calls
    • Dependencies
    • Auth
      • Supabase
      • AWS
    • How to
      • Change Logo
      • Skip Login
  • Theming
    • Color
    • Typography
    • Icons
  • Global
    • Config
    • Styles
    • Component Overrides
Powered by GitBook
On this page
  1. Development
  2. Auth

Supabase

PreviousAuthNextAWS

To setup Supabase in your project, first you need to . Create a project and get supabaseUrl and supabaseKey for integration.

  1. Make sure the email provider is enabled and configured with proper values. Path : Supabase => Authentication => Providers

  1. To send an OTP on the signup flow, you need to configure it in the Supabase email template with {{ .Token }} variable. You can also design your own email template there. Path : Supabase => Authentication => Email Templates

  1. Supabase account is configured; now we will set it up in our project. To enable Supabase authentication, make the following changes:

    1. Change the auth provider in the config file.

      src/config.ts
      ...
      export const AUTH_PROVIDER: AuthType = AuthType.SUPABASE;
      ...
    2. Add your supabaseUrl and supabaseKey in .env file.

      .env
      ...
      
      ## Supabase
      NEXT_PUBLIC_SUPABASE_URL=
      NEXT_PUBLIC_SUPABASE_ANON_KEY=

🎉 Congrats! Supabase is now configured in your project. 🚀 You can test it by running the project. By default, signup assigns the "user" role. You can customize this role in the signUp API of Supabase by modifying the code in src/app/api/supabase/auth/index.ts to fit your specific requirements.

According to the new guidelines of Supabase, you need to setup your own SMTP server to send an email. For more information about Supabase and its integrations, view the .

documentation
create your Supabase account