Marked as helpful by the asker
Went through the flow with two test accounts. The invoice list is scoped correctly, good. Two things I'd fix before real users:
- The
/api/exportroute returns every user's invoices as CSV, no auth check at all, I could hit it logged out. - Check the redirect URLs list in Supabase auth settings matches your production domain exactly, not just the preview one.
Fix the export route first, that's the real hole.