Skip to content

feat(auth): Add LinkDomain to ActionCodeSettings #703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from

Conversation

graeme-verticalscope
Copy link

Discussion

Add the LinkDomain field to the ActionCodeSettings struct, this new field enables migrating off of firebase dynamic links, which is deprecated and will be unsupported soon.

See #681, I was asked to create a second PR targeting master branch. Original PR is #682

Copy link

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together!

@lahirumaramba lahirumaramba self-assigned this Jul 8, 2025
@lahirumaramba lahirumaramba changed the title Add LinkDomain to ActionCodeSettings feat(auth): Add LinkDomain to ActionCodeSettings Jul 8, 2025
@lahirumaramba lahirumaramba changed the base branch from master to dev July 8, 2025 16:31
@lahirumaramba
Copy link
Member

Thanks for the contribution! The base branch for PRs should be pointed to dev (I just changed it here), please update the feature branch and let me know if you run into any issues.

@graeme-verticalscope
Copy link
Author

I guess you'll want to close either this PR or #682. I had originally created a PR targeting dev, but was recently asked to make one targeting master

@Xiaoshouzi-gh
Copy link

I guess you'll want to close either this PR or #682. I had originally created a PR targeting dev, but was recently asked to make one targeting master

Approved #682 too.

@jonathanedey jonathanedey self-requested a review July 17, 2025 17:59
Copy link
Contributor

@jonathanedey jonathanedey left a comment

Choose a reason for hiding this comment

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

Hi @graeme-verticalscope, thanks for getting started on this.

Can you add some error logic similar for what we have for dynamicLinkDomain:

invalidDynamicLinkDomain = "INVALID_DYNAMIC_LINK_DOMAIN"

For invalidHostingLinkDomain the backend error should be "INVALID_HOSTING_LINK_DOMAIN"

// IsInvalidDynamicLinkDomain checks if the given error was due to an invalid dynamic link domain.
func IsInvalidDynamicLinkDomain(err error) bool {
return hasAuthErrorCode(err, invalidDynamicLinkDomain)
}

"INVALID_DYNAMIC_LINK_DOMAIN": {
code: internal.InvalidArgument,
message: "the provided dynamic link domain is not configured or authorized for the current project",
authCode: invalidDynamicLinkDomain,
},

Also ensure these are included in our tests:

"INVALID_DYNAMIC_LINK_DOMAIN": {
IsInvalidDynamicLinkDomain,
errorutils.IsInvalidArgument,
"the provided dynamic link domain is not configured or authorized for the current project",
},

cases := map[string]func(error) bool{
"UNAUTHORIZED_DOMAIN": IsUnauthorizedContinueURI,
"INVALID_DYNAMIC_LINK_DOMAIN": IsInvalidDynamicLinkDomain,
}

Thanks!

@@ -31,6 +31,7 @@ type ActionCodeSettings struct {
AndroidPackageName string `json:"androidPackageName,omitempty"`
AndroidMinimumVersion string `json:"androidMinimumVersion,omitempty"`
AndroidInstallApp bool `json:"androidInstallApp,omitempty"`
LinkDomain string `json:"linkDomain,omitempty"`
DynamicLinkDomain string `json:"dynamicLinkDomain,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a deprecation note for DynamicLinkDomain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants