This is the full Cloud Functions code explained in my blog post: How to schedule a Cloud Function to run in the future (in order to build a Firestore document TTL)
This is the runnable sample code from the blog post [Patterns for security with Firebase Authentication: offload work to Cloud Functions][1]. It discusses offloading work from a client app to Cloud Functions using an authentication trigger.
- Create a new Firebase project
- Enable email/password authentication
- Provision Cloud Firestore and apply the rules given in this gist
- Use the Firebase CLI to create a workspace for Functions using TypeScript
- Deploy the given HTML and JavaScript to Firebase Hosting (the CLI emulator will also work).
- Deploy the function code to Cloud Functions using the Firebase CLI
This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:
index.ts
contains the Cloud Functions code, and dialog.ts
contains the script to run
This is the example code from my video about using async/await with Cloud Functions. I've placed it here in a gist so it's easier to compare the "before" and "after" states for each case.
The code in this project is licensed under the Apache License 2.0.
Copyright 2018 Google LLC
If you're trying to do this, you came to the right place!
See this code in action here: https://twitter.com/CodingDoug/status/953031540811825152
- Create a Firebase project at the Firebase Console
If you're trying to do this, you came to the right place!
See this code in action here: https://twitter.com/CodingDoug/status/948225623939473413
These instructions assume that you already have a Firebase project, and you've provisioned Firestore in it.
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/945035556555186176
These instructions assume that you already have a Firebase project, and billing is enabled. Billing is required to use the Vision API.
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/942576182276497409
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/ffc4f050cc489a0280eb7f4cbe36af07
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/940022568089554944
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/44ad12f4836e79ca9fa11ba5af6955f7