Share JWT secret key to be used in Next Auth functionality and custom Django API #1226
Unanswered
angelhodar
asked this question in
Help
Replies: 1 comment 1 reply
-
I am also curious about this—@angelhodar did you end up trying it to see if it works? 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What are you trying to do
I want to create a platform that would consist in basically a dashboard with NextJS and a custom backend in Python as it is related to machine learning and I prefer to use Python with Django REST Framework for this. It also has a landing page and a sign in page to access that dashboard. Because of this, I was wondering if it could be possible to handle the auth functionality with Next-Auth and use the JWT option to be able to send the returned token to my Djando API and validate it there with the same secrent env var as the one used in Next Auth with the Vercel env vars.
Feedback
I found this blog post which seems to solve this issue but it seems that my Django API would have to create another access token, and my question is that it should be possible to use the same JWT in both API and Next-Auth if I share the same secret right?
Beta Was this translation helpful? Give feedback.
All reactions