Supabase User Auth + Site Integration

null

Prep

Reading list

Watch list

Supabase Auth Deep Dive

Final Project

  • Instructions
  • Due: April 5, 2024
  • Work in Assigned Pairs
  • Create a Website that features:
    • A Directus CMS + Supabase Backend
    • User login and authentication
    • A Blog Collection Type
    • Authenticated User Customized Experience
  • For this assignment, styling and design are NOT important at all
  • Focus on backend services and features only

Review: Connect Supabase to Nuxt

  • Use the Nuxt Supabase Module
  • Steps:
    • install the module as a dev dependency
    • add it to your nuxt config in the modules list
    • create a .env file (project root) = Add your SUPABASE_URL and your SUPABASE_KEY
  • The Supabase Nuxt Module is really a wrapper for the supabase-js module

Javascript Review: Destructuring Assignment

  • Destructuring is when you see things like:
  • note the use of the spread operator, this will aggregate all the rest of the values not specified
const { a, b, ...rest } = objectWithPropertiesAnB;
const [firstVal, secondVal] = arrayOfAtLeastTwoItems;

Materials


Authentication

Configure User Signup

Activity (pair code): User signup support

  • first, set a policy on your film table that only authenticated users can read the data

How signup and authentication works


User Logout

Activity (pair code): create a logout button

Verify user logout

Lab Activity: Sign in Button

  • In your pairs, create a button that makes it so a user can sign back in
  • Submit a link to your repo to the dailies

Advanced Activity: Configure Google Auth for Faster Login

Today's Achievement

Lab Activity: Plan your Hackathon Sprint

  • With your partner, write up a plan for the final project
  • Outline your objectives and the deadlines for each objective
  • Document tomorrows focus
    • identify challenges
    • clarify achievable outcomes
    • distribute responsibilities
  • Submit hackathon sprint plan to brightspace for dailies