In this lesson, we'll integrate supabase into a traditional frontend application, where we'll use it to set up a new authorization as well as building a basic login page with Next.js and Supabase's auth.session()
. We'll use react hooks such as useEffect and useState to manage the state.
There is no supabase.auth.session()
function anymore. You need to use supabase.auth.getSession()
which is a Promise. And that fails for me as it apparently cannot be part of the useState
hook :/
Thanks for bringing this to our attention! This is out of date because this course uses Supabase V1 where it's on V2. Here is a guide for Supabase Auth with Next.js for V2: https://supabase.com/docs/guides/auth/auth-helpers/nextjs.