Skip to content

feat(auth): Update ActionCodeSettings to support link_domain and deprecate dynamic_link_domain#884

Merged
jonathanedey merged 9 commits into
firebase:masterfrom
huwmartin:action-code-settings-link-domain
Jul 23, 2025
Merged

feat(auth): Update ActionCodeSettings to support link_domain and deprecate dynamic_link_domain#884
jonathanedey merged 9 commits into
firebase:masterfrom
huwmartin:action-code-settings-link-domain

Conversation

@huwmartin

@huwmartin huwmartin commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

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 use linkDomain, 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 with link_domain and currently only supports dynamic_link_domain, firebase-admin-node has been updated with support for linkDomain 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 accept link_domain and updates encode_action_code_settings to handle link_domain when constructing request payload. I have also added definition for new InvalidHostingLinkDomainError error.

@huwmartin

Copy link
Copy Markdown
Contributor Author

@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.

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Copy link
Copy Markdown

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!

Comment thread firebase_admin/_auth_utils.py Outdated

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for putting this together!

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@huwmartin huwmartin force-pushed the action-code-settings-link-domain branch from 1d9d933 to dfce7c1 Compare July 7, 2025 17:33
@lahirumaramba lahirumaramba self-assigned this Jul 8, 2025
@jonathanedey jonathanedey self-requested a review July 14, 2025 14:14

@jonathanedey jonathanedey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @huwmartin for putting this together! Overall LGTM with one minor change below.

Comment thread firebase_admin/_user_mgt.py Outdated
@jonathanedey jonathanedey requested review from egilmorez and removed request for OrlandriaH-G July 23, 2025 15:12

@jonathanedey jonathanedey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Please address the lint error and update the branch, Thanks!

@egilmorez egilmorez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LG, thanks!

@huwmartin

Copy link
Copy Markdown
Contributor Author

@jonathanedey thanks, lots of other issues when running ./lint.sh all locally, CI appears to only lint touched lines(?), so difficult to tell what will snag 😄 I've updated all of ActionCodeSettings.__init__ for consistency.

@jonathanedey

jonathanedey commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

@huwmartin, no worries, those were mainly because the branch was out of date. We made some lint changes in or last release and the CI here are using those settings. Thanks again for you contribution!

@jonathanedey jonathanedey changed the title Update ActionCodeSettings to support link_domain feat(auth) Update ActionCodeSettings to support link_domain and deprecate dynamic_link_domain Jul 23, 2025
@jonathanedey jonathanedey merged commit 4fa2918 into firebase:master Jul 23, 2025
10 checks passed
@jonathanedey jonathanedey changed the title feat(auth) Update ActionCodeSettings to support link_domain and deprecate dynamic_link_domain feat(auth): Update ActionCodeSettings to support link_domain and deprecate dynamic_link_domain Jul 23, 2025
jonathanedey pushed a commit that referenced this pull request Aug 13, 2025
…eprecate `dynamic_link_domain` (#884)

* Add link_domain to ActionCodeSettings; update encode_action_code_settings to handle link_domain

* Add handling for InvalidHostingLinkDomainError

* Add deprecation warning for dynamic_link_domain

* Update error message for InvalidHostingLinkDomainError

* Fix lint

* Add type hints to ActionCodeSettings

* Fix f-string lint
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.

6 participants