Add Supabase authentication to your WeWeb apps

Handle user sign-up, login, and access while keeping full control over your frontend and app logic.

Table of Contents
Start building today with WeWeb!
Build your first application in no time!

Add secure authentication to your web apps

The WeWeb and Supabase Auth integration lets you add secure authentication flows to your web apps, including:

  • User sign-up and login with email and password
  • Magic link and OAuth-based authentication
  • Session management and user state handling
  • Visual logic for handling authenticated and unauthenticated states
  • The ability to combine auth with other data sources
  • Access to pages and components based on auth state
  • Logic and workflow triggers based on user actions

What WeWeb supports natively

Category Feature What it does
Plugin setup Supabase Auth plugin Adds Supabase authentication from Plugins → Authentication using project URL, public API key, and private API key for full auth integration.
UI elements Login/Signup UI components Provides pre-built Login, Signup, and Change Password UI elements with built-in styling and form validation, ready to drop onto pages.
Auth flows Email/password auth Supports standard email/password signup, login, logout, and password reset flows using Supabase’s built-in auth system.
Auth flows Magic link & OTP Enables passwordless flows like magic links and one-time passwords sent via email for frictionless login experiences.
OAuth Google OAuth + providers Supports OAuth flows with Google and other providers.
User context Current user object Exposes the authenticated user’s profile (ID, email, metadata) as a bindable object for personalized UI and conditional rendering.
Role management Roles & permissions tables Optional configuration links Supabase roles and users_roles tables so WeWeb can manage and display user roles from the Users tab.
Page protection Public/private page settings Lets you mark pages as public or protected. Unauthenticated users are redirected to login based on auth state.
Workflow actions Auth workflow actions Provides actions like Sign up, Sign in, Sign out, Reset password, and Confirm password for complete auth flows in workflows.
RLS integration Automatic JWT forwarding Passes the user JWT to data requests so Supabase Row Level Security policies work without extra configuration.
User metadata Custom user fields Supports capturing and storing custom metadata (nickname, preferences) during signup and displaying it in the app.

Why use WeWeb with Supabase Auth

Supabase Auth handles authentication and identity. WeWeb lets you design how that experience looks and behaves.

Perfect for:

  • SaaS apps with user accounts and protected pages
  • Client portals with login-based access
  • Internal tools with restricted user roles
  • Membership platforms and gated content
  • Multi-tenant apps with user-specific data

And more…

Integrating Supabase Auth with WeWeb

Integrating Supabase Auth with WeWeb is straightforward:

  1. Open the WeWeb Editor and go to Plugins → Authentication
  2. Add Supabase Auth
  3. Enter your Supabase project URL 
  4. Configure auth actions such as sign up, login, and logout

Learn more about Supabase Auth x WeWeb integration

Best practices 

  • Store app-specific user data in Supabase tables
  • Protect sensitive pages at the WeWeb routing level
  • Test edge cases like expired sessions and logout flows
  • Follow Supabase’s recommended auth providers and settings

FAQs

1. How do I connect Supabase Auth to WeWeb?

Enable the Supabase Auth plugin and enter your Supabase project URL, public anon key, and service role key in the plugin settings. Once configured, Supabase Auth UI elements and workflow actions become available throughout your project.

2. What authentication methods does Supabase Auth support in WeWeb?

The plugin supports email/password signup/login, magic link (passwordless), OTP codes, and OAuth providers like Google through dedicated workflow actions and UI components. All standard Supabase auth flows work out of the box with minimal configuration.

3. Can I use Supabase's pre-built auth UI components?

Yes, WeWeb provides ready-made Login, Signup, and Password Reset components you can drag onto pages. These components handle form validation, error states, and styling automatically, with full customization available.

4. How does user context work after login?

Once authenticated, WeWeb exposes a "current user" object containing the user's ID, email, metadata, and session state. You can bind this object to show personalized content, user avatars, or conditionally render admin sections.

5. How do I protect pages or components for logged-in users only?

Use page settings to mark pages as "private" or add conditional visibility rules to components based on authentication state. Unauthenticated users get redirected to login automatically when accessing protected content.

6. Can I manage user roles and permissions with Supabase Auth in WeWeb?

The plugin optionally connects to Supabase roles and user_roles tables, letting you assign and display user permissions. You can then use role data in conditional logic for admin panels, feature gating, or personalized dashboards.

Start building for free

Sign up now, pay when you're ready to publish.