feat(auth): Add LinkDomain to ActionCodeSettings and deprecate DynamicLinkDomain#475
Merged
jonathanedey merged 4 commits intomasterfrom Aug 27, 2025
Merged
Conversation
This change adds support for specifying a hosting link domain in `ActionCodeSettings`. This is used for email action links. The following changes were made: - Added the `LinkDomain` property to the `ActionCodeSettings` class. - Deprecated the `DynamicLinkDomain` property in `ActionCodeSettings`. - Added the `InvalidHostingLinkDomain` error code to `AuthErrorCode` and the corresponding error handling logic in `AuthErrorHandler`. - Updated the `EmailActionLinkRequest` to use the new `LinkDomain` property and remove usage of the deprecated `DynamicLinkDomain` property. - Updated unit tests to cover the new functionality and error conditions. Removed tests for the deprecated property as per repository guidelines to avoid build failures. - Fixed a style error in the tests that was introduced.
This commit corrects the implementation of the `LinkDomain` feature based on feedback. The previous implementation had incorrectly removed the deprecated `DynamicLinkDomain` functionality. The following corrections were made: - Restored the `DynamicLinkDomain` property and its related logic in the production code to maintain backward compatibility. - Updated all `.csproj` files to suppress the `CS0618` obsolescence warning, which is the correct way to handle this deprecation without breaking the build. - Restored the original unit tests for `DynamicLinkDomain` and added new, separate tests for the `LinkDomain` property. - Updated the code snippets to use the new `LinkDomain` property. - Fixed a style error in the test files.
… of permitting obsolete warnings.
asbhatia029
reviewed
Aug 19, 2025
| new ErrorInfo( | ||
| ErrorCode.InvalidArgument, | ||
| AuthErrorCode.InvalidHostingLinkDomain, | ||
| "The provided hosting link domain is not configured in Firebase Hosting or is not owned by the current project") |
There was a problem hiding this comment.
Are these error message same accross all SDKs? Also the message looks confusing for the developers
"Cant we just say he provided hosting link domain is not configured in Firebase Hosting for this project"
Collaborator
Author
There was a problem hiding this comment.
We do use that same error message across the other SDKs:
https://github.com/firebase/firebase-admin-node/blob/f861260ed3035cf3a8a0af285ccc755d926f242a/src/utils/error.ts#L507.
If we wanted to change that messaging we'd likely have to mirror that in the other SDKs as well.
egilmorez
approved these changes
Aug 25, 2025
Contributor
egilmorez
left a comment
There was a problem hiding this comment.
LG with a nit, thanks!
asbhatia029
approved these changes
Aug 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces support for specifying a hosting
LinkDomaininActionCodeSettingswhen generating email action links. As part of this changeDynamicLinkDomainhas been deprecated.