I ditched firebase cloud functions for Next's /api/ functions. I put all the db stuff and checkout and webhook stuff behind those endpoints. At first I just loaded the entire firestore library on the client and did authenticated reads/writes directly... But I wouldn't do that again, made my app too heavily intertwined with firestore's api.
andrewmcwatters|4 years ago