firebase-google登录时未触发触发器

时间:2018-10-11 14:13:26

标签: firebase firebase-authentication google-cloud-functions google-authentication

我有以下代码,当我使用Google或Facebook帐户登录时不会触发。

// When a user is created, register them with Stripe
exports.createStripeCustomer = functions.auth.user().onCreate((user) => {
  return stripe.customers.create({
    email: user.email,
  }).then((customer) => {
    return admin.database().ref(`/stripe_customers/${user.uid}/customer_id`).set(customer.id);
  });
});

我该如何检查我的应用程序上的新用户是否使用了Facebook或google登录?

0 个答案:

没有答案