A Lovable app runs on Supabase underneath, so real authentication means calling Supabase's Auth methods. Here is the actual shape of that flow, plus the one setting people forget right after.
An overlay appears directly on top of Supabase and Lovable. No tab switching, no re-reading docs.
Copy your Project URL
Find the Project URL field below and click the copy icon. We will use this in Lovable’s environment settings.
Stylized preview. The real guide is interactive, not a screenshot.
Call Supabase's sign-up method with an email and a password. This is what actually creates the user record in your project, not just a form on the page. Confirm the new user shows up under Authentication in your Supabase dashboard.
Call the sign-in-with-password method using that same email and password. A successful call returns a session for that user, which is what your app checks to know someone is logged in.
Getting sign-up and sign-in working proves auth is wired up, but it does not by itself protect your data. Row Level Security still needs to be turned on for any table storing user-specific information, or a signed-in user could read rows that are not theirs.
Copy the access token off the session object and decode it with a JWT viewer. Compare the signing key in the token against your project settings to confirm the session is genuinely coming from your Supabase project, not a stale or mismatched one.
Because Lovable's Cloud runs on Supabase by default, these are the same Auth calls whether you are using Lovable's built-in backend or a Supabase project you connected yourself. The mission walks through wiring this into a real Lovable-generated app rather than a bare script.
Creating a user and starting a session for that user are two different actions in Supabase, which is why they are two different method calls. Sign-up creates the account; sign-in is what happens every time that person comes back. Keeping them separate is also what makes password resets, email confirmation, and session refresh possible later without redesigning the flow.
The session token your app gets back after sign-in is a signed JWT, not just a random string. Decoding it shows the user ID and metadata Supabase attached, and checking the signing key against your project settings is how you confirm the session was actually issued by your project and has not been tampered with or swapped from another one.
Want to build this for real instead of just reading about it?
You need a form for collecting email and password, but the account creation and session logic is handled by Supabase's Auth methods, not something you build from scratch. Lovable can generate the form; the sign-up and sign-in calls underneath are Supabase's.
Lovable's Cloud runs on Supabase by default, but authentication is not automatically wired into a fresh app. You still call the sign-up and sign-in methods for your specific app, and this is one of the steps most new builders skip until they need real users.
No. Authentication and Row Level Security are separate systems. A user being signed in only means you know who they are, RLS is the setting that actually controls which rows in a table that specific user can read or write.
It is a signed session token containing the user's ID and metadata. Decoding it and checking the signing key against your project settings is how you confirm a session genuinely belongs to your Supabase project.
Yes. The sign-up and sign-in methods work the same way on an existing project. Just confirm Row Level Security is on for any table holding user data before you expose it to signed-in users.
A successful sign-up call is not the only proof a user exists. Check the Authentication tab in your Supabase project after calling sign-up to confirm the new user record actually landed there.
Copy the access token from a real session and run it through a JWT viewer at least once. Seeing the user ID and signing key firsthand makes every future auth bug easier to diagnose.
Call sign-in with password using the same email and password you just signed up with, and confirm you get back a session object. That session, not the click, is what your app should be checking.
Working sign-up and sign-in only tells your app who someone is. Turn on Row Level Security and write a policy for any table holding user data before you consider the flow finished.
You're not the problem. The format is. Here's what changes when you switch to an interactive mission.
Looking for the next thing to build? Browse every mission and find one that matches what you are trying to ship.
Browse all missions