Skip to content

Commit 00a899c

Browse files
committed
add phone to auth user onCreate hook too
1 parent dfad07e commit 00a899c

File tree

1 file changed

+6
-2
lines changed
  • firestore-stripe-subscriptions/functions/src

1 file changed

+6
-2
lines changed

firestore-stripe-subscriptions/functions/src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ const createCustomerRecord = async ({
8686
exports.createCustomer = functions.auth.user().onCreate(
8787
async (user): Promise<void> => {
8888
if (!config.syncUsersOnCreate) return;
89-
const { email, uid } = user;
90-
await createCustomerRecord({ email, uid });
89+
const { email, uid, phoneNumber } = user;
90+
await createCustomerRecord({
91+
email,
92+
uid,
93+
phone: phoneNumber
94+
});
9195
}
9296
);
9397

0 commit comments

Comments
 (0)