firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

Auth onCreate and onDelete triggers for v2 functions

Open laurentpayot opened this issue 2 years ago • 66 comments

Please add Authentication onCreate and onDelete triggers for v2 functions in the SDK, this is really missing. :pray:

Related issues

https://github.com/firebase/firebase-functions/issues/1213 https://github.com/firebase/firebase-functions/issues/1381

Version info

firebase-functions: v4.3.1

firebase-tools: 11.29.0

laurentpayot avatar Apr 26 '23 06:04 laurentpayot

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Apr 26 '23 06:04 google-oss-bot

Hey @laurentpayot, thanks for requesting! This is currently a limitation of all 2nd gen functions (Node or Python). A workaround for now is to use 1st gen functions for Auth onCreate and onDelete triggers. Note that 1st gen and 2nd gen functions can coexist side-by-side in the same file.

jhuleatt avatar May 22 '23 16:05 jhuleatt

Thanks for your answer @jhuleatt. I did not know a mix of 1st and 2nd gen functions was possible. I will use this "workaround" for now. I’m still eagerly awaiting v2 auth triggers :wink:

laurentpayot avatar May 23 '23 06:05 laurentpayot

Any updates on this?

laurentpellegrino avatar Aug 16 '23 08:08 laurentpellegrino

Seems to be the only ones missing now, do we have an ETA on when these will make it into v2?

jjgriff93 avatar Aug 24 '23 14:08 jjgriff93

+1

jacobg avatar Nov 16 '23 17:11 jacobg

+1

dhutaryan avatar Nov 21 '23 13:11 dhutaryan

+1

emilioiz avatar Nov 29 '23 22:11 emilioiz

+1

quirkles avatar Dec 05 '23 19:12 quirkles

+1

amacapas avatar Dec 12 '23 17:12 amacapas

+1

mvergarair avatar Dec 28 '23 17:12 mvergarair

+1

Martinnord avatar Jan 08 '24 22:01 Martinnord

+1

kafkas avatar Jan 10 '24 08:01 kafkas

When can we expect this?`

sebastianrueckerai avatar Jan 10 '24 20:01 sebastianrueckerai

+1

sveinlo avatar Jan 19 '24 08:01 sveinlo

I believe we can use a HTTP v2 function for blocking "Before the user is created" https://firebase.google.com/docs/auth/extend-with-blocking-functions?gen=2nd. It is a workaround for onCreate callback.

cuong0993 avatar Feb 23 '24 13:02 cuong0993

+1

muraterzioglu avatar Feb 28 '24 22:02 muraterzioglu

@cuong0993 > I believe we can use a HTTP v2 function for blocking "Before the user is created" https://firebase.google.com/docs/auth/extend-with-blocking-functions?gen=2nd. It is a workaround for onCreate callback.

Yes, I try it but this trigger not working in emulators ... (or i don't find how to) and i believe acces right is limited (for interact with firestore or other)

I any one know a solution for use blocking functions in emulators

solarpush avatar Mar 17 '24 11:03 solarpush

+1 for Python support

vazome avatar Jul 06 '24 14:07 vazome

+1

newcaiosantos avatar Aug 02 '24 23:08 newcaiosantos

+1

yousefh409 avatar Sep 07 '24 01:09 yousefh409

+1

hytka81 avatar Sep 17 '24 17:09 hytka81

Will this be implemented at some point? The docs say the following -

Note: Cloud Functions for Firebase (2nd gen) does not provide support for the events and triggers described in this guide. Because 1st gen and 2nd gen functions can coexist side-by-side in the same source file, you can still develop and deploy this functionality together with 2nd gen functions.

But they still urge us to upgrade all our functions to v2...

Seanitzel avatar Sep 19 '24 11:09 Seanitzel

Yes, please add this. I updated my firebase functions to the latest, now I get firebase.runWith is not a function error. How can you say it co-exists when it cant after you upgrade to the latest version of firebase-functions?

+1

jay8t6 avatar Sep 27 '24 14:09 jay8t6

+1

haybreaker avatar Sep 28 '24 02:09 haybreaker

+1, classic half-baked major upgrades by Firebase

enchorb avatar Oct 09 '24 13:10 enchorb

+1

rublev avatar Oct 22 '24 02:10 rublev

+1

sak6lab avatar Oct 25 '24 18:10 sak6lab

+1

Smrtnyk avatar Oct 25 '24 18:10 Smrtnyk

+1

10eputzen avatar Oct 27 '24 10:10 10eputzen