firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.02k stars 202 forks source link

Auth onCreate and onDelete triggers for v2 functions #1383

Open laurentpayot opened 1 year ago

laurentpayot commented 1 year ago

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

google-oss-bot commented 1 year ago

I found a few problems with this issue:

jhuleatt commented 1 year ago

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.

laurentpayot commented 1 year ago

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:

lpellegr commented 1 year ago

Any updates on this?

jjgriff93 commented 1 year ago

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

jacobg commented 10 months ago

+1

dhutaryan commented 10 months ago

+1

emilioiz commented 10 months ago

+1

quirkles commented 10 months ago

+1

amacapas commented 9 months ago

+1

mvergarair commented 9 months ago

+1

Martinnord commented 9 months ago

+1

kafkas commented 8 months ago

+1

sebastianrueckerai commented 8 months ago

When can we expect this?`

sveinlo commented 8 months ago

+1

cuong0993 commented 7 months ago

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.

muraterzioglu commented 7 months ago

+1

solarpush commented 6 months ago

@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

vazome commented 3 months ago

+1 for Python support

newcaiosantos commented 2 months ago

+1

yousefh409 commented 4 weeks ago

+1

hytka81 commented 2 weeks ago

+1

Seanitzel commented 2 weeks ago

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...

jay8t6 commented 1 week ago

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

haybreaker commented 1 week ago

+1