You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(auth): Add LinkDomain to ActionCodeSettings and deprecate DynamicLinkDomain (#475)
* feat(auth): Add LinkDomain to ActionCodeSettings
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.
* fix(auth): Correct implementation of LinkDomain feature
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.
* fix(auth): Refactor generated tests and use pragma directives instead of permitting obsolete warnings.
* fix(chore): Fixed docstring and updated `AGENTS.md` with learnings
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ dotnet test FirebaseAdmin/FirebaseAdmin.Tests --framework net462
72
72
### Journey 2: How to Deprecate a Field/Method in an Existing API
73
73
74
74
1.**Add Deprecation Note**: Locate where the deprecated object is defined and add a deprecation warning with a note (e.g. [Obsolete("Use X instead")]).
75
-
2.**Remove Releted Tests and Update Snippets**: Because `Obsolete` warnings result in build errors, tests and snippets where the object is used should be removed or updated not no longer used the deprecated object.
75
+
2.**Suppress Obsolete Warnings**: Because `Obsolete` warnings result in build errors, tests and snippets where the object is used should be marked using `#pragma` directives to suppress warnings where the object is used.
0 commit comments