firebase-tools
firebase-tools copied to clipboard
user.providerDara returned by functions.auth.user().onCreate on emulator is not consistent with Cloud function in cloud
When I trigger functions.auth.user().onCreate the user.providerDara param returned is different in Emulator and Cloud.
- On emulator the user.providerData looks following doc: {"providerId":"phone","phoneNumber":"+5521983487233","rawId":"+5521983487233"}
- And same record on cloud looks: {"providerId":"phone", "uid":"+5521983487233"}
I've logged responses above w/ following cf code:
export const onAuthUserCreate = functions.auth.user().onCreate(
(
user: admin.auth.UserRecord,
context: EventContext
): Promise<void> {
console.log(user.providerData);
return Promise.resolve();
}
);
This inconsistency prevent testing locally when providerData is used on cf.
Tested on [email protected] and [email protected]