Supabase Role-Based Authorization Tutorial: Control EVERYTHING Users Can SEE and DO!
Vložit
- čas přidán 27. 07. 2024
- ► Exclusive NoCode Content, Tutorials & Support: / jamesnocode
► Comprehensive FlutterFlow Training & Private Community: masteringflutterflow.com
► Comprehensive Supabase Training & Private Community: masteringsupabase.com
00:00 Intro
01:04 The App
04:25 Auth Flow
04:50 Configuring Authentication
10:29 Adapting Our App for Auth
20:58 Configuring Authorization
23:34 How Permissions are Structured
27:58 Enforcing At Database Layer (w/Row Level Security)
32:33 Generating RLS with CGPT
54:08 Enforcing At The UI Layer
57:38 Adding More Users to Roles
59:39 Get More Content - Jak na to + styl
👍VIEW/CLONE ALL MY NOCODE APPS + support my work: www.patreon.com/jamesnocode
👍GET MY NEW TRAINING - MASTERING FLUTTERFLOW: masteringflutterflow.com
thank you soo much! I had been waiting for someone to cover this topic using supabase! You are the best!!!
Very useful. Thanks 😮
Perfect timing!
It would be very helpful if a user creates an account to set a default role.
Thank you! This is exactly what I was looking for!!
Glad it was helpful!
Thanks this is amazing. You’re really one of the best teacher. Can you do the same tutorial using firebase please ? It’s highly demanded as most of us use firebase with flutterflow. Thanks in advance. 😊
Hi james. Really love your videos, it helped me a lot. Can you make a tutorial that shows different pages/page flow based on their user roles? I'm stuck at this problem since I have 3 user roles and I want them to see different pages starting from when they log in. Lots of people are having this same problem as seen on flutterflow's community. Would really appreciate the help. Thanks, and keep on producing tutorial videos like this please.
Sounds like your next could be multi-tenant where a tenant has multiple users and roles!
Bro, thanks, just i need to implement this in my gym administrator app, but the supabase documentation is not to clearly, a lot of thanks for this information.
Is there a tutorial on how to get ChatGPT to pull information from your Firebase?
Finally the one missing tutorial nobody was making until now. Thanks for this James. You're the BEST!! Happy to be supporting you! Does RLS also work on views, so when combining the articles table with another table. Have not touched flutterflow or supabase for a few months now but looking forward to trying it out!
Make how you can show letter as profile in flutterflow please
Thanks for a really good video.
I have followed every step but stuck in a strange problem.
In the SQL Editor when I run the admin_all_access code, admin rights are not created for 'Admin'.
Same problem with the 'Writer' code.
FlutterFlow correctly finds both 'Admin' and 'Writer' rights under profile.
Now I wonder if anyone can advise what could be wrong?
When Supabase RLS is disabled it is possible to read/write/delete/update.
When Supabase RLS is enabled, it is blank.
When policy view_all_articles is activated all users can read all posts but write/delete/update is not possible.
I use the Supabase Pro plan.
We have to add RLS on role, user_roles tables to run it correctly ...
is there a way to pull more data from the user table like phone number, name, etc without using API call ?
@jamesnocode Hi James
I wanted to ask a question about your master course in the simple app and the complex app
In the complex app there's four modules is that four different apps or one long app with four videos and what does that include in the apps specifically is there a how to create a payment system? Is there a deployment to the Google store? Those courses aren't very detailed.
I also didn't see that you're teaching building ship I was wondering why that's not in the course? And will it be?
Would be awesome to see the same in Firebase/Firestore
Is it possible to achieve with Firebase?
Hi James, thanks for the video. Just one question:
I followed your policy creation and it works just as you've demo-ed. However, have you checked the Security Advisor and Performance Advisor under Tools tab? I'm getting some performance warnings, specifically "Auth RLS Initialization Plan". Even after I changed `auth.uid()` to `(select auth.uid())`. Can't seem to fix them.
Hi James, thank you for this great tutorial. I've a question; What software you're using for your visial presentation in the video?👍
I think its Whimsical
How to allow a user to delete their data?!
How about role based different homepage routing during the supabase logging ? Say I have 3 users like Homeowner, Realestater and tenant? Each have very different functionality in their pages and see different data. Thank you for your help and nice video.
Pull data based on their ID
@@nicholassingh138 I have entirely different pages to show! Right now I have a API call for the user role and put to app state and then routing to different pages in a if else !
Thanks a lot ..... Why not in firebase?
firebase is expensive and it isn't a relational db.
This RLS shouldn't work, unless you're using the service key, because you have RLS enabled on the roles table, but you have no policies set up? Meaning that the user shouldn't be able to select the role, as he has no access to the user_roles table. This is kinda weird.
Explain this to me like I'm dumb, which i am in this topic
how will flutterflow identify the role of a user if he has 2 roles (for example writer and admin)?