Company
Date Published
Author
Brooks Naylor
Word count
1418
Language
English
Hacker News points
None

Summary

This guide outlines the process of building a server-side rendered application using Next.js 13, PropelAuth, and Supabase, focusing on managing users and organizations. It begins with setting up a PropelAuth project to handle authentication instead of the default Supabase options and then moves on to creating a Supabase project with at least one table, requiring specific configurations like a "user_id" column of "uuid" type. The Next.js application is created and configured with the @propelauth/nextjs library, and environment variables are set up for authentication and database connection. Routes are established to handle authentication requests, and an AuthProvider is added to the application. A Supabase client is set up to use user information from PropelAuth, allowing for secure data fetching with row-level security (RLS) policies to ensure users access only their own data. The guide also touches on PropelAuth's capabilities for enabling B2B authentication features like organizations and role-based access control, providing flexibility in referencing organizations within the application.