Next.js Discord

Discord Forum

Next.js API w/ Google's Firestore Database

Unanswered
English Angora posted this in #help-forum
Open in Discord
English AngoraOP
Dear forum,

I have a web app with Google authentication working, now I would love to use my API with Firestore Database, but I can't seem to find a good tutorial or any docs on how to get this communicating between each other.

It's working on itself, I just want to be able to pass data to the database, and I am not sure how this works with authentication, I currently can go to my endpoint without being authenticated.

I added some images for more information.

Please let me know if you need any more information.

Thank you so much.

Best regards.

Paddy

2 Replies

Dunker
basically you ll setup auth in middleware, after hitting that endpoint you ll work with firebase in api routes
user -> middleware -> allows -> routes -> /api/getThing -> firebase