我有以下代码,当我使用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登录?