Adding OAuth or Passwords
Not wired by default. What to change in Supabase and the sign-in modal.
Not wired by default
Only magic links ship. Supabase supports email and password, and OAuth providers like Google and GitHub, and the client in lib/supabaseClient.js can call them. Adding one means a Supabase dashboard change plus a small UI change. Nothing else in the template assumes a particular method: the users row, credits and purchase claiming all key off the Supabase user.
OAuth
1. Supabase dashboard → Authentication → Providers: enable the provider and paste its client ID and secret
2. Add your production and localhost URLs under URL Configuration
3. Add a button to components/marketing/ButtonSignin.jsx:
const { error } = await supabase.auth.signInWithOAuth({
provider: "google",
options: {
redirectTo: `${window.location.origin}/auth/callback?next=${encodeURIComponent(nextPath)}`,
},
});Email and password
Enabled in Supabase by default, so only the UI is missing. Add fields to the sign-in modal and call signUp and signInWithPassword. You will also want the password reset email template and a reset page, which the template does not include.
await supabase.auth.signUp({ email, password });
await supabase.auth.signInWithPassword({ email, password });Verify
After adding a method, run npm test. The flow tests cover signup credits and purchase claiming and will tell you if the new path skipped the database triggers.