Adding roles to Next Auth when using Discord or Facebook providee

How can I add a role to a user. I have 2 admins and the rest are normal users.
3 Replies
barry
barry•10mo ago
Just add a role column to the user model And include it in the next-auth callback t3 docs show how last i checked
sommeeer
sommeeer•10mo ago
Ok and then I just choose who to become admin and update my db on the outside? 😊 Ill try it out now
barry
barry•10mo ago
sure, just change role on prisma studio
Want results from more Discord servers?
Add your server
More Posts
How to make a lists of multiple data types with overlapping IDsI have types `Foo` and `Bar` and I want to show a list containing elements of both. The problem is tHydration Failed Error in Next.js: Mismatch Between Server and Client Rendered HTMLHello fellow developers, I've been working on a Next.js application, and I've encountered a "HydratHow to implement session-based auth in NextJS13 without services like Nextauth/clerk/supabase etcI want to have session based authentication for my small SaaS prototype side projects, and I want toFetching data from API endpointsIs there a way to fetch data from client Component without exposing API endpoints on frontend?Database Table Design/Layout for Analytics type data?I am looking to store views and clicks, with the possibility of other types of data moving into the Typescript errors with `cloneElement`Hi all 👋 So while building my app I faced an issue that really put my UI at test. As I am sure manPerformance of Prismais using Prisma in production save ? I have heard so much negativity regarding ORM . One argument wierror passing props to client component?What’s wrong with the way I’m trying to pass in two strings as props to this client component?TrPC + Express + Next 13# src/app/api/trpc/[trpc]/route.ts ```ts import { FetchCreateContextFnOptions, fetchRequestHandlAuthenicating API routes to be only be request by same-origin Nextjs 13So i am looking to lock down some of my API routes to be only requested by my domain and any subdoma