Question

How do I add a 'forgot password' flow to my Lovable app?

Solved · 4 views · asked by noor_builds · edited

Lovable made login and signup with Supabase. There is no forgot-password link, and users ask for it.

What I’ve tried

Asked Lovable to add it; it added a button that does nothing.

Comment

1 answer

Marked as helpful by the asker
mira_dev · edited

Three parts:

  1. A page with an email field that calls supabase.auth.resetPasswordForEmail(email, { redirectTo: 'https://yourapp/reset' }).
  2. Add https://yourapp/reset to Redirect URLs in Supabase Auth settings.
  3. A /reset page that, once the user lands there with a session, shows a new-password field and calls supabase.auth.updateUser({ password }).

Give Lovable those three bullet points literally. "Add forgot password" is too vague for it; the three calls are not.

Comment