Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
auth-helpers
Discontinued A collection of framework specific Auth utilities for working with Supabase. [Moved to: https://github.com/supabase/auth-helpers] (by supabase-community)
Check out the library auth0; they have prebuilt Google OAuth solutions ready to go. Here's a video about it by Fireship: Auth0 in 100 Seconds (including a tutorial on setting up Next.js authentication with it after the 100 seconds).
(you can see the project I'm working on here).
No, you don't need to do this. The currently logged in user will be available in the session object (user) so you don't need to query the database to get the logged in user. Just use the uid (userid) field from the user object to get the profile data you need. If you want to speed things up even further, you can avoid hitting the database altogether and store some of the profile data in a custom claim, as seen here: https://github.com/supabase-community/supabase-custom-claims (but that's probably overkill -- you can safely just use a profile table and it'll be fast enough.
Now I'm facing another pretty big issue.