Creating eventarc triggers for Firebase Auth events

604 Views Asked by At

I tried to create a trigger for user deletes (Firebase Auth) that should call my Cloud Run instance but it seems that it doesn't trigger even after the 10 minutes. This is how I created the trigger:

gcloud eventarc triggers create on-delete-user \
  --event-filters="methodName=google.firebase.auth.user.v1.deleted" \
  --event-filters="serviceName=identitytoolkit.googleapis.com" \
  --event-filters="type=google.cloud.audit.log.v1.written" \
  --destination-run-service=grpc-v1-dev \
  --destination-run-path=/api.v1.DeleteUserEvent \
  --service-account [email protected] \
  --location europe-west4 \
  --project projectId \
  --format json

What am I missing?

UPDATE: I also tried to user the method name that I saw in the Logs.

gcloud eventarc triggers create on-delete-user-2 \
  --event-filters="type=google.cloud.audit.log.v1.written" \
  --event-filters="serviceName=identitytoolkit.googleapis.com" \
  --event-filters="methodName=google.cloud.identitytoolkit.v1.AccountManagementService.DeleteAccount" \
  --destination-run-service=grpc-v1-dev \
  --destination-run-path=/api.v1.DeleteUserEvent \
  --service-account [email protected] \
  --location europe-west4 \
  --project projectId \
  --format json

UPDATE2:

I also tried to create it using the console, but still no events.

enter image description here

UPDATE3: I do get events from google.cloud.identitytoolkit.v1.AccountManagementService.DeleteAccount in the log and my cloud instance receives the call, but the data I received has nothing to do with the model here.

https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/firebase/auth/v1/events.proto

0

There are 0 best solutions below