File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -383,9 +383,9 @@ export type User = AdminUserRecord;
383383 */
384384export interface AuthEvent < T > extends CloudEvent < T > {
385385 /** The project identifier*/
386- project : string ;
387- /** The ID of the Identity Platform Tenant Assosciated with the event. If Applicable */
388- tenantId : string ;
386+ project ? : string ;
387+ /** The ID of the Identity Platform Tenant Associated with the event. If Applicable */
388+ tenantId ? : string ;
389389}
390390
391391/** Options for configuring a Firebase Authentication Trigger */
@@ -422,7 +422,11 @@ function makeAuthTrigger(
422422 const { opts, handler : handlerFunc } = getOptsAndHandler ( optsOrHandler , handler ) ;
423423
424424 const func = ( ( raw : CloudEvent < unknown > ) => {
425- const event = raw as AuthEvent < User > ;
425+ const event : AuthEvent < User > = {
426+ ...raw ,
427+ project : undefined ,
428+ tenantId : undefined ,
429+ } as AuthEvent < User > ;
426430 const rawAny = raw as any ;
427431 if ( rawAny . tenantid ) {
428432 event . tenantId = rawAny . tenantid ;
@@ -455,7 +459,7 @@ function makeAuthTrigger(
455459 region : "global" ,
456460 } ,
457461 } ;
458- if ( opts . tenantId ) {
462+ if ( opts . tenantId !== undefined ) {
459463 if ( opts . tenantId === IS_NOT_TENANT ) {
460464 endpoint . eventTrigger . eventFilters [ "tenantid" ] = "" ;
461465 } else {
You can’t perform that action at this time.
0 commit comments