@@ -134,8 +134,6 @@ def _firestore_endpoint_handler(
134134 event_namespace = event_attributes ["namespace" ]
135135 event_document = event_attributes ["document" ]
136136 event_database = event_attributes ["database" ]
137- event_auth_type = event_attributes ["authtype" ]
138- event_auth_id = event_attributes ["authid" ]
139137
140138 time = event_attributes ["time" ]
141139 event_time = _util .timestamp_conversion (time )
@@ -208,6 +206,8 @@ def _firestore_endpoint_handler(
208206 func = _core ._with_init (func )
209207
210208 if event_type .endswith (".withAuthContext" ):
209+ event_auth_type = event_attributes ["authtype" ]
210+ event_auth_id = event_attributes ["authid" ]
211211 database_event_with_auth_context = AuthEvent (** vars (database_event ),
212212 auth_type = event_auth_type ,
213213 auth_id = event_auth_id )
@@ -270,7 +270,7 @@ def on_document_written_with_auth_context(**kwargs
270270 ) -> _typing .Callable [[_C1 ], _C1 ]:
271271 """
272272 Event handler that triggers when a document is created, updated, or deleted in Firestore.
273- This trigger will also provide the authentication context of the principal who triggered
273+ This trigger will also provide the authentication context of the principal who triggered
274274 the event.
275275
276276 Example:
@@ -369,7 +369,7 @@ def on_document_updated_with_auth_context(**kwargs
369369 ) -> _typing .Callable [[_C1 ], _C1 ]:
370370 """
371371 Event handler that triggers when a document is updated in Firestore.
372- This trigger will also provide the authentication context of the principal who triggered
372+ This trigger will also provide the authentication context of the principal who triggered
373373 the event.
374374
375375 Example:
@@ -468,7 +468,7 @@ def on_document_created_with_auth_context(**kwargs
468468 ) -> _typing .Callable [[_C2 ], _C2 ]:
469469 """
470470 Event handler that triggers when a document is created in Firestore.
471- This trigger will also provide the authentication context of the principal who triggered
471+ This trigger will also provide the authentication context of the principal who triggered
472472 the event.
473473
474474 Example:
@@ -567,7 +567,7 @@ def on_document_deleted_with_auth_context(**kwargs
567567 ) -> _typing .Callable [[_C2 ], _C2 ]:
568568 """
569569 Event handler that triggers when a document is deleted in Firestore.
570- This trigger will also provide the authentication context of the principal who triggered
570+ This trigger will also provide the authentication context of the principal who triggered
571571 the event.
572572
573573 Example:
0 commit comments