Hello,
Hoping someone can help me understand a Nextjs problem/question.
What I would like to do is use Firebase as an auth provider for users and connect it to my existing python/FastAPI backend services. My intent is to pass the JWT from the frontend to the services, validate, and return the appropriate response for that user after page load.
I would like to use Nextjs for the static generation and fill the user specific data on load each time.
What I’m stuck on is the approach to getting the user logged in, obtaining a token and passing it along to the existing services. I could roll the auth as a fastapi service, but it would make more sense to capture it all in the front end and check the auth when requesting data.
Anyone have suggestions or a link to a GitHub repo that already does this? Should be a simple problem but I’m getting hung up unfortunately with the auth portion. I’m fine once that’s solved, but it’s tripping me up a bit.
Background is in python/django and vanilla react, but nextjs seems like a great fit for what I’m trying to do.
Thanks!
submitted by /u/Namur007
[link] [comments]