Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1818

Cloud Function trigger on user sign in Firebase

$
0
0

I am trying to make my firebase send a https request, containing the user token, to my distant database.

For that, I am trying to trigger a cloud function on the user login.

However, I found out that I cannot do that with the first version of cloud functions. But, now that the v2 has been released, I was wondering if there was now a way to do it ?

Here is my v1 function but that only works with the creation of an account :

const functions = require("firebase-functions");const {onRequest} = require("firebase-functions/v2/https");const {onDocumentCreated} = require("firebase-functions/v2/firestore");exports.onUserConnect = functions.auth.user().onCreate((user) => {    console.log("Bonjour !");});

Thanks for your answer.


Viewing all articles
Browse latest Browse all 1818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>