Supabase Role-Based Authorization Tutorial: Control EVERYTHING Users Can SEE and DO!

Sdílet
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

Komentáře • 34

  • @jamesnocode
    @jamesnocode  Před 7 měsíci +1

    👍VIEW/CLONE ALL MY NOCODE APPS + support my work: www.patreon.com/jamesnocode
    👍GET MY NEW TRAINING - MASTERING FLUTTERFLOW: masteringflutterflow.com

  • @KaiCodingJourney
    @KaiCodingJourney Před 7 měsíci +2

    thank you soo much! I had been waiting for someone to cover this topic using supabase! You are the best!!!

  • @damirmister4078
    @damirmister4078 Před 7 měsíci +1

    Very useful. Thanks 😮

  • @turbolike7
    @turbolike7 Před 7 měsíci +1

    Perfect timing!

  • @juniorfabianpachecomoyano8150
    @juniorfabianpachecomoyano8150 Před měsícem +2

    It would be very helpful if a user creates an account to set a default role.

  • @Dipj01
    @Dipj01 Před 24 dny

    Thank you! This is exactly what I was looking for!!

  • @monthewilfriedtutorials5423
    @monthewilfriedtutorials5423 Před 7 měsíci

    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. 😊

  • @aaronrecto9222
    @aaronrecto9222 Před 3 měsíci

    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.

  • @bobsteele6563
    @bobsteele6563 Před 5 měsíci +1

    Sounds like your next could be multi-tenant where a tenant has multiple users and roles!

  • @juniorfabianpachecomoyano8150

    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.

  • @vieskip
    @vieskip Před 7 měsíci +2

    Is there a tutorial on how to get ChatGPT to pull information from your Firebase?

  • @jimvh7557
    @jimvh7557 Před 6 měsíci

    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!

  • @palmyrasport
    @palmyrasport Před 7 měsíci +1

    Make how you can show letter as profile in flutterflow please

  • @MarttiMustonen-kz9vc
    @MarttiMustonen-kz9vc Před 4 měsíci

    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.

  • @sbessot
    @sbessot Před 6 měsíci

    We have to add RLS on role, user_roles tables to run it correctly ...

  • @JuanPerez-vv5lk
    @JuanPerez-vv5lk Před 6 měsíci

    is there a way to pull more data from the user table like phone number, name, etc without using API call ?

  • @sharoni3d
    @sharoni3d Před 6 měsíci

    @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?

  • @liamcarter-hawkins7177
    @liamcarter-hawkins7177 Před 7 měsíci +1

    Would be awesome to see the same in Firebase/Firestore

    • @eremeev1992
      @eremeev1992 Před 6 měsíci

      Is it possible to achieve with Firebase?

  • @assaultressgamer
    @assaultressgamer Před 3 měsíci

    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.

  • @RonaldKlop-pn6rb
    @RonaldKlop-pn6rb Před 3 měsíci

    Hi James, thank you for this great tutorial. I've a question; What software you're using for your visial presentation in the video?👍

  • @Michael-Martell
    @Michael-Martell Před 20 dny

    How to allow a user to delete their data?!

  • @sharanchakradhar
    @sharanchakradhar Před 7 měsíci

    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.

    • @nicholassingh138
      @nicholassingh138 Před 6 měsíci

      Pull data based on their ID

    • @sharanchakradhar
      @sharanchakradhar Před 6 měsíci

      @@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 !

  • @JULAY28
    @JULAY28 Před 7 měsíci

    Thanks a lot ..... Why not in firebase?

    • @JuanPerez-vv5lk
      @JuanPerez-vv5lk Před 6 měsíci

      firebase is expensive and it isn't a relational db.

  • @brobroberto
    @brobroberto Před měsícem

    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.

    • @deechonada
      @deechonada Před měsícem

      Explain this to me like I'm dumb, which i am in this topic

  • @Skountrianos.george
    @Skountrianos.george Před 5 měsíci

    how will flutterflow identify the role of a user if he has 2 roles (for example writer and admin)?