Adding roles to NextAuth.js/tRPC/T3 Stack

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 5

  • @Billiam112
    @Billiam112 Рік тому +1

    Nice job with the thumbnails man! 👌Good luck with the channel, really enjoy your content! :)

  • @vizunaldth
    @vizunaldth Рік тому

    Nice

  • @athulgeorge4873
    @athulgeorge4873 Рік тому

    How would one attach isAdmin to the useSession within our NextJS application?

    • @monroeprograms
      @monroeprograms  Рік тому +1

      this method used in the video should attach the isAdmin to the useSession result. Anything set on the session callback will show up when using the session data
      next-auth.js.org/configuration/callbacks#session-callback

    • @athulgeorge4873
      @athulgeorge4873 Рік тому

      @@monroeprograms thankyou however when I tried to attach the role itself to my T3 app, is says the role is undefined, I also cannot access it through ctx in a protected trpc route