Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Note that, because I'm now going to be referencing a Firestore collection, I need to import firebase-admin functions and call initializeApp() to authenticate the function. The firebase-admin SDK is a special set of functions used specifically for Cloud function work (see the Firebase Admin SDK for details). Note that I don't need to supply credentials - according to Google's Run functions locally document "Cloud Firestore triggers are automatically granted permission because they are running in a trusted environment". In fact, I'd strictly only need the admin.initializeApp() statement if I was intending to use Firestore functions on document other than the one that fires the trigger - but it's probably best to get used to using it as a standard practice when working with Firestore functions.
Related posts
- Auth during use on serverside (with firebase security rules).
- transfering image from from app to api
- Writing data to Firestore from another server?
- What is the best stack to use with firebase?
- Firebase Admin SDK w/ Stripe hooks on Vercel Next JS: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential