MENU

Fun & Interesting

Handling user data in Supabase

WeWeb 14,397 2 years ago
Video Not Working? Fix It Now

💡 Supabase Auth: Changes to default email provider : https://github.com/orgs/supabase/discussions/29370 In Supabase, the users table is private by default. If you need users to be able to view or edit other users' information in your WeWeb app, the recommended approach is to create a profiles table in the public schema of your Supabase project and that is synced to your users table. This video covers the following key points - • Handling user data in Supabase, specifically focusing on creating a public profiles table that syncs with the private users table in the auth schema⁠. • Setting up row-level security and policies for the public profiles table to control access and permissions⁠. • Creating a trigger and function to automatically populate the public profiles table when a new user signs up, including step-by-step instructions and explanations of the SQL code⁠. Documentation: ➡ https://docs.weweb.io/plugins/auth-systems/supabase-auth.html#users-vs-profiles * * * * * Subscribe to our channel to be the first to hear about new video releases! 🙂https://www.youtube.com/@weweb WeWeb is a no-code platform that empowers anyone to create pixel-perfect frontends on top of any backend without vendor lock-in. Why limit yourself by a monolithic architecture? Our mission is to enable you to build scalable web applications 10x faster. Whether you're a first-time entrepreneur or an enterprise-grade company, you can turn your ideas into fully functional, scalable solutions — faster and cheaper than you could with just code. Have a question? Please visit https://support.weweb.io/. Learn more about WeWeb: 🏠 Homepage: https://weweb.io/ 📣 Twitter: https://x.com/weweb_io ❤️ Community: https://community.weweb.io/ 00:00 - Intro 01:25 - Default Supabase project 02:51 - Add user management 04:00 - Create profiles table 05:38 - Add Row-Level Security (RLS) 08:00 - Trigger new profile when new user 10:20 - Run the SQL query 11:00 - Review result in Supabase UI 13:30 - Test new signup in WeWeb 14:50 - Improve function triggered on new user creation 16:15 - Take it further with Supabase #weweb #supabase #tutorials #backend #frontend #nocode

Comment