Skip to content

fix(functions): unregister blocking triggers registered to the run.app URL - #11549

Open
IzaakGough wants to merge 3 commits into
mainfrom
fix/blocking-unregister-runapp
Open

IzaakGough wants to merge 3 commits into
mainfrom
fix/blocking-unregister-runapp

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11532.

After a 2nd gen auth blocking function had been redeployed, firebase functions:delete removed the function but left its Identity Platform trigger registered.

This makes delete remove a trigger registered to either of the function's URLs.

Tested with unit tests and a live create, update and delete on released 15.36.0 and this branch.

…p URL

Update deploys register a 2nd gen blocking function with its run.app URL,
but delete only matched the cloudfunctions.net URL, so the trigger was left
registered. Delete now matches either URL of the function.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes an issue where deleting a 2nd generation auth blocking function left its Identity Platform trigger registered if the function had been updated since its first deployment. This is achieved by tracking both the Cloud Functions URL (uri) and the Cloud Run service URL (runServiceUri) for v2 blocking functions, and checking both during unregistration. Feedback on the changes suggests adding explicit checks to ensure endpoint.uri is defined before comparing it to the trigger's URI, adhering to the repository's strict null/undefined check guidelines.

Comment thread src/deploy/functions/services/auth.ts Resolved
@IzaakGough
IzaakGough marked this pull request as ready for review November 18, 2026 11:57

@CorieW CorieW left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting a v2 auth blocking function leaves its Identity Platform registration behind after the function has been updated

2 participants