firebase / firebase/functions-samples
Revise email-users example to handle multiple function executions for a single user
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 3.8k
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
I'm using the code from the sample here:
https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users
onCreate is sometimes triggered multiple times for the same user. Most of the time it is triggered once, but sometimes it is triggered two times or even 7 times (which happened yesterday).
`exports.sendWelcomeEmail = functions.auth.user().onCreate(event => {`
No errors in the log, just the normal debug statements and the text output from `console.log('New welcome email sent to:', email);`
If I choose "View all from this execution", all 7 are shown, so they come from the same execution.
7 emails are also sent, so it's not just the debug output.
Only 1 account is created.
Contributor guide
Assessment
This issue has not been assessed yet.