-
Notifications
You must be signed in to change notification settings - Fork 340
Update ActionCodeSettings to support link_domain #884
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: master
Are you sure you want to change the base?
Update ActionCodeSettings to support link_domain #884
Conversation
@lahirumaramba @pashanka see here re: #883. In my org we're currently relying on this via a fork and would be great to get into main release. |
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!
firebase_admin/_auth_utils.py
Outdated
@@ -328,6 +328,15 @@ def __init__(self, message, cause, http_response): | |||
exceptions.InvalidArgumentError.__init__(self, message, cause, http_response) | |||
|
|||
|
|||
class InvalidHostingLinkDomainError(exceptions.InvalidArgumentError): | |||
"""Hosting link domain in ActionCodeSettings is not authorized.""" |
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 you update both msgs to be
"Hosting link domain in ActionCodeSettings is not authorized or is not owned by the current project."? to be more aligned with node SDK. See: https://github.com/firebase/firebase-admin-node/blob/26b884f70300ef8e3213dfbbd72351ce7f68c695/src/utils/error.ts#L510
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.
Certainly, appreciate you putting eyes on this. Updated in bc7fcfc.
Discussion
Firebase Dynamic Links will stop working August 25th 2025.
Migration instructions indicate that to use a custom domain one should update usage of
ActionCodeSettings
to uselinkDomain
, see also in the Firebase Admin docs.We currently depend upon
generate_sign_in_with_email_link
to generate email links,firebase-admin-python
hasn't been updated withlink_domain
and currently only supportsdynamic_link_domain
,firebase-admin-node
has been updated with support forlinkDomain
so I assume this should be officially supported, please let me know if this is not the case.See #883.
This PR updates
ActionCodeSettings
to acceptlink_domain
and updatesencode_action_code_settings
to handlelink_domain
when constructing request payload. I have also added definition for newInvalidHostingLinkDomainError
error.