Repository navigation
Open
Description
[REQUIRED] Environment info
firebase-tools: 14.27.0 (delete) / 15.18.0 (update deploy)
Platform: Ubuntu (GitHub Actions)
[REQUIRED] Test case
const { beforeSmsSent } = require("firebase-functions/v2/identity");
exports.authBlocking = {
beforeSmsSent: beforeSmsSent(() => {}),
};[REQUIRED] Steps to reproduce
firebase deploy --only functions(creates the function).
GET https://identitytoolkit.googleapis.com/admin/v2/projects/<project>/confignow shows
blockingFunctions.triggers.beforeSendSms.functionUri = https://<region>-<project>.cloudfunctions.net/authBlocking-beforeSmsSent- Change the function (e.g. add a log line) and run
firebase deploy --only functionsagain (updates the function).
functionUriis nowhttps://authblocking-beforesmssent-<hash>-<region-code>.a.run.app firebase --debug functions:delete authBlocking.beforeSmsSent --forceGET .../admin/v2/projects/<project>/configagain.
[REQUIRED] Expected behavior
The function is deleted and its beforeSendSms registration is removed.
[REQUIRED] Actual behavior
The function is deleted, but the beforeSendSms registration is left pointing at the deleted function's run.app URL, so every SMS send (phone sign-in) fails until the registration is removed manually. If the function is deleted right after step 1 (never updated), the registration is removed correctly.
The debug log shows the CLI reading the config, finding the run.app URL registered, and deleting the function without updating the config (project ID and hash replaced, response bodies trimmed):
$ firebase --debug functions:delete authBlocking.beforeSmsSent --force
...
[2026-11-12T01:45:23.437Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/my-project/locations/-/functions 200
[2026-11-12T01:45:23.445Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/my-project/locations/-/functions {"functions":[..., {"name":"projects/my-project/locations/asia-northeast1/functions/authBlocking-beforeSmsSent", ..., "url":"https://asia-northeast1-my-project.cloudfunctions.net/authBlocking-beforeSmsSent", "serviceConfig":{..., "uri":"https://authblocking-beforesmssent-xxxxxxxxxx-an.a.run.app"}, "environment":"GEN_2"}, ...]}
i functions: deleting Node.js 22 (2nd Gen) function authBlocking-beforeSmsSent(asia-northeast1)...
[2026-11-12T01:45:23.561Z] >>> [apiv2][query] GET https://identitytoolkit.googleapis.com/admin/v2/projects/my-project/config [none]
[2026-11-12T01:45:23.723Z] <<< [apiv2][status] GET https://identitytoolkit.googleapis.com/admin/v2/projects/my-project/config 200
[2026-11-12T01:45:23.723Z] <<< [apiv2][body] GET https://identitytoolkit.googleapis.com/admin/v2/projects/my-project/config {..., "blockingFunctions":{"triggers":{"beforeSendSms":{"functionUri":"https://authblocking-beforesmssent-xxxxxxxxxx-an.a.run.app","updateTime":"2026-11-12T01:16:16.614Z"}},"forwardInboundCredentials":{}}, ...}
[2026-11-12T01:45:23.724Z] >>> [apiv2][query] DELETE https://cloudfunctions.googleapis.com/v2/projects/my-project/locations/asia-northeast1/functions/authBlocking-beforeSmsSent [none]
[2026-11-12T01:45:24.809Z] <<< [apiv2][status] DELETE https://cloudfunctions.googleapis.com/v2/projects/my-project/locations/asia-northeast1/functions/authBlocking-beforeSmsSent 200
...
✔ functions[authBlocking-beforeSmsSent(asia-northeast1)] Successful delete operation.
There is no request to update the Identity Platform config after the GET.
Activity
IzaakGough commentedon Nov 17, 2026
Hi @elekom thanks for raising this. We will review as soon as possible.
aalej commentedon Nov 17, 2026
Thanks for the clear steps to reproduce the issue and for sharing your findings, @elekom! I was able to reproduce the reported behavior. A
beforeSmsSentfunction that has been updated does not get properly deleted byfunctions:delete. As you noted, this causes Phone number Authentications to fail sinceblockingFunctions.triggers.beforeSendSmsstill exists and points to a non-existent function. Sharing mcve here - https://github.com/aalej/issues-11532It looks like you should be able to remove the function from
blockingFunctions.triggers.beforeSendSms, by doing the ff:functions:deleteon this newly created functionMarking this as reproducible and will raise this to our engineering team.