-
Notifications
You must be signed in to change notification settings - Fork 266
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
base: dev
Are you sure you want to change the base?
feat(auth): Add LinkDomain to ActionCodeSettings #703
Conversation
- Release 4.12.0
This reverts commit 32af2b8.
There was a problem hiding this 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!
Thanks for the contribution! The base branch for PRs should be pointed to |
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 |
There was a problem hiding this 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
:
firebase-admin-go/auth/user_mgt.go
Line 524 in d515faf
invalidDynamicLinkDomain = "INVALID_DYNAMIC_LINK_DOMAIN" |
For invalidHostingLinkDomain
the backend error should be "INVALID_HOSTING_LINK_DOMAIN"
firebase-admin-go/auth/user_mgt.go
Lines 554 to 557 in d515faf
// IsInvalidDynamicLinkDomain checks if the given error was due to an invalid dynamic link domain. | |
func IsInvalidDynamicLinkDomain(err error) bool { | |
return hasAuthErrorCode(err, invalidDynamicLinkDomain) | |
} |
firebase-admin-go/auth/user_mgt.go
Lines 1445 to 1449 in d515faf
"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:
firebase-admin-go/auth/user_mgt_test.go
Lines 2149 to 2153 in d515faf
"INVALID_DYNAMIC_LINK_DOMAIN": { | |
IsInvalidDynamicLinkDomain, | |
errorutils.IsInvalidArgument, | |
"the provided dynamic link domain is not configured or authorized for the current project", | |
}, |
firebase-admin-go/auth/email_action_links_test.go
Lines 293 to 296 in d515faf
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"` |
There was a problem hiding this comment.
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
.
Discussion
Add the
LinkDomain
field to theActionCodeSettings
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