nextjs auth guidance with django rest framework and discord social auth.
Answered
Californian posted this in #help-forum
CalifornianOP
I am not finding the NexAuth.js docs all that helpful and am wondering if anyone has any solid resources for setting up nextjs to authenticate via discord -> django rest framework -> back to nextjs (whereby the next app can query both drf and discord via separate apis).
Thanks!
Thanks!
Answered by B33fb0n3
It does not seems like that nextauth support django as adapter: (see attached). However, you can still add the discord provider like that: https://next-auth.js.org/providers/discord to your nextauth config. Like that you will be able to login with discord but have your own backend. You can then directly use jwt to have a valid session and the auth part is completed 👍
2 Replies
@Californian I am not finding the NexAuth.js docs all that helpful and am wondering if anyone has any solid resources for setting up nextjs to authenticate via discord -> django rest framework -> back to nextjs (whereby the next app can query both drf and discord via separate apis).
Thanks!
It does not seems like that nextauth support django as adapter: (see attached). However, you can still add the discord provider like that: https://next-auth.js.org/providers/discord to your nextauth config. Like that you will be able to login with discord but have your own backend. You can then directly use jwt to have a valid session and the auth part is completed 👍
Answer