Next.js Discord

Discord Forum

Nextjs + Flask + Nextauth ?

Unanswered
Jumbo flying squid posted this in #help-forum
Open in Discord
Jumbo flying squidOP
Hi,
I'm working on my first project with Next.js, and I initially set up a simple authentication using NextAuth and credentials, with Prisma and PlanetScale for the database. But as I went along, it became evident that a Python backend would be a better fit. I really need to use a specific python library, and I couldn't find a good javascript alternative.
I followed the Next.js + Flask (https://github.com/vercel/examples/tree/main/python/nextjs-flaskexample) to add a Flask backend to my project. But now, I'm kind of stuck on how to handle the authentication part. Plus, I need to access my database from flask, which means I'll have to use a Prisma Python client alongside the Prisma JavaScript client I'm already using if I keep using NextAuth.
Any suggestions on how to tackle this? I'm a complete beginner so feel free to suggest something other than flask or nextauth if it can suit my project better.

0 Replies