Functions Auth Trigger on Sign In

19 views
Skip to first unread message

Kemal Yalcinkaya

unread,
May 26, 2017, 11:04:11 AM5/26/17
to Firebase Google Group
Hello everyone

Right now there are only two triggers working under auth. One is onCreate and the other is onDelete.

I would like to trigger a function when the user sign ins (logins). Something like onLogin()

Is it possible to implement a custom trigger like that?

The only solution I came up with is to change the auth login request (currently handled by AngularFire2) with a http request and implement my function with this trigger.

Any other suggestions?

Thanks a lot! 

Doug Stevenson

unread,
Jun 1, 2017, 7:00:52 PM6/1/17
to Firebase Google Group
If you have a specific definition or situation for what it means for a user to log in to your app, you're probably better off capturing that in the app itself, and triggering some function to run.  One possibility is by writing a last login date to Realtime Database, then having a database trigger handle that event.

Doug
Reply all
Reply to author
Forward
0 new messages