Skip to content
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

Add ActionCodeSettings.linkDomain and deprecate ActionCodeSettings.dynamicLinkDomain #8738

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

NhienLam
Copy link
Contributor

Firebase Auth relies on Firebase Dynamic Links (FDL) for mobile out-of-band email action flows. As FDL is deprecated, we're introducing a new solution, Firebase Hosting links, to replace FDL usage in Firebase Auth.

Add a new ActionCodeSettings.linkDomain property to customize the Firebase Hosting link domain that is used in out-of-band email action flows.

Deprecate ActionCodeSettings.dynamicLinkDomain. Migrate to use Firebase Hosting link and use ActionCodeSettings.linkDomain to set a custom domain instead.

Migration guide and public documentations will be available after the SDK release.

NhienLam and others added 6 commits January 28, 2025 13:36
* Add linkDomain field to ActionCodeSettings

* Update API reports

* Update error message for ERROR_INVALID_HOSTING_LINK_DOMAIN to include that default hosting domains cannot be used.

* Use constants for test values

---------

Co-authored-by: NhienLam <[email protected]>
* Implement Integration test for passwordless email sign-in via firebase-hosting links.

* Add license to new test file created' did not match any files

* Remove unwanted _
Copy link

changeset-bot bot commented Jan 28, 2025

🦋 Changeset detected

Latest commit: cb98346

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
firebase Minor
@firebase/auth-types Minor
@firebase/auth Minor
@firebase/auth-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 28, 2025

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

docs-devsite/auth.actioncodesettings.md Outdated Show resolved Hide resolved
@@ -46,6 +47,11 @@ android?: {

## ActionCodeSettings.dynamicLinkDomain

> Warning: This API is now obsolete.
Copy link
Contributor

Choose a reason for hiding this comment

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

"obsolete" isn't a word that we use to describe launch cycle stages. Do you maybe mean "deprecated"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually autogenerated when I tagged the property with @deprecated. Should I manually change it to Warning: This API is now deprecated?

@@ -46,6 +47,11 @@ android?: {

## ActionCodeSettings.dynamicLinkDomain

> Warning: This API is now obsolete.
>
> Firebase Dynamic Links is deprecated. Migrate to use Firebase Hosting link and use `linkDomain` to set a custom domain instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like something is missing from this part of the sentence:

"... Firebase Hosting link..."

Copy link
Contributor Author

@NhienLam NhienLam Jan 28, 2025

Choose a reason for hiding this comment

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

I'm not sure what it's missing, could you elaborate? We're telling developers to migrate from Firebase Dynamic Links to Firebase Hosting link; and use the new linkDomain field instead of the old dynamicLinkDomain field to set a custom domain. Do you have any suggestions to improve the sentence?

docs-devsite/auth.actioncodesettings.md Outdated Show resolved Hide resolved
docs-devsite/auth.actioncodesettings.md Outdated Show resolved Hide resolved
packages/auth/src/core/errors.ts Outdated Show resolved Hide resolved
@@ -513,8 +513,18 @@ export interface ActionCodeSettings {
*
*
* @defaultValue The first domain is automatically selected.
*
* @deprecated Firebase Dynamic Links is deprecated. Migrate to use Firebase Hosting link and use
Copy link
Contributor

Choose a reason for hiding this comment

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

here too... looks like something is missing in this description

packages/auth/src/model/public_types.ts Outdated Show resolved Hide resolved
packages/auth/src/model/public_types.ts Outdated Show resolved Hide resolved
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 28, 2025

Size Report 1

Affected Products

  • @firebase/auth

    TypeBase (dafae52)Merge (3d1dae9)Diff
    browser188 kB189 kB+469 B (+0.2%)
    cordova164 kB164 kB+469 B (+0.3%)
    main145 kB145 kB+469 B (+0.3%)
    module188 kB189 kB+469 B (+0.2%)
    react-native163 kB164 kB+469 B (+0.3%)
  • @firebase/auth-cordova

    TypeBase (dafae52)Merge (3d1dae9)Diff
    browser164 kB164 kB+469 B (+0.3%)
    module164 kB164 kB+469 B (+0.3%)
  • @firebase/auth-web-extension

    TypeBase (dafae52)Merge (3d1dae9)Diff
    browser140 kB140 kB+469 B (+0.3%)
    main157 kB158 kB+469 B (+0.3%)
    module140 kB140 kB+469 B (+0.3%)
  • @firebase/auth/internal

    TypeBase (dafae52)Merge (3d1dae9)Diff
    browser199 kB199 kB+469 B (+0.2%)
    main171 kB172 kB+471 B (+0.3%)
    module199 kB199 kB+469 B (+0.2%)
  • @firebase/database

    TypeBase (dafae52)Merge (3d1dae9)Diff
    browser249 kB249 kB+12 B (+0.0%)
    main254 kB254 kB+12 B (+0.0%)
    module249 kB249 kB+12 B (+0.0%)
  • @firebase/database-compat/standalone

    TypeBase (dafae52)Merge (3d1dae9)Diff
    main366 kB366 kB+12 B (+0.0%)
  • bundle

    TypeBase (dafae52)Merge (3d1dae9)Diff
    database (Append to a list of data)150 kB150 kB+12 B (+0.0%)
    database (Filtering data)148 kB148 kB+12 B (+0.0%)
    database (Listen for child events)165 kB165 kB+12 B (+0.0%)
    database (Listen for value events + Detach listeners)165 kB165 kB+12 B (+0.0%)
    database (Listen for value events)165 kB165 kB+12 B (+0.0%)
    database (Read data once)164 kB164 kB+12 B (+0.0%)
    database (Save data as transactions)167 kB167 kB+12 B (+0.0%)
    database (Sort data)150 kB150 kB+12 B (+0.0%)
    database (Write data)149 kB149 kB+12 B (+0.0%)
  • firebase

    TypeBase (dafae52)Merge (3d1dae9)Diff
    firebase-auth-compat.js143 kB143 kB+323 B (+0.2%)
    firebase-auth-cordova.js136 kB136 kB+392 B (+0.3%)
    firebase-auth-web-extension.js119 kB119 kB+392 B (+0.3%)
    firebase-auth.js155 kB155 kB+392 B (+0.3%)
    firebase-compat.js808 kB808 kB+336 B (+0.0%)
    firebase-database-compat.js166 kB166 kB+12 B (+0.0%)
    firebase-database.js187 kB187 kB+12 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/x4FPklr7UU.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 28, 2025

Size Analysis Report 1

Affected Products

  • @firebase/auth

    • AuthErrorCodes

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size44.4 kB44.5 kB+63 B (+0.1%)
      size-with-ext-deps66.3 kB66.3 kB+63 B (+0.1%)
    • debugErrorMap

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size51.5 kB51.7 kB+222 B (+0.4%)
      size-with-ext-deps73.4 kB73.6 kB+222 B (+0.3%)
    • sendEmailVerification

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size40.2 kB40.3 kB+118 B (+0.3%)
      size-with-ext-deps62.1 kB62.2 kB+119 B (+0.2%)
    • sendPasswordResetEmail

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size45.8 kB46.0 kB+118 B (+0.3%)
      size-with-ext-deps67.7 kB67.8 kB+119 B (+0.2%)
    • sendSignInLinkToEmail

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size45.9 kB46.0 kB+118 B (+0.3%)
      size-with-ext-deps67.8 kB67.9 kB+119 B (+0.2%)
    • verifyBeforeUpdateEmail

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size40.2 kB40.4 kB+118 B (+0.3%)
      size-with-ext-deps62.1 kB62.2 kB+119 B (+0.2%)
  • @firebase/database

    • DataSnapshot

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • Database

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • OnDisconnect

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size120 kB120 kB+12 B (+0.0%)
      size-with-ext-deps142 kB142 kB+12 B (+0.0%)
    • QueryConstraint

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • TransactionResult

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • _QueryImpl

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _QueryParams

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _ReferenceImpl

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _TEST_ACCESS_forceRestClient

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _TEST_ACCESS_hijackHash

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • _initStandalone

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps143 kB143 kB+12 B (+0.0%)
    • _repoManagerDatabaseFromApp

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _setSDKVersion

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • _validatePathString

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • _validateWritablePath

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • child

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • connectDatabaseEmulator

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • enableLogging

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • endAt

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • endBefore

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size119 kB119 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • equalTo

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size120 kB120 kB+12 B (+0.0%)
      size-with-ext-deps142 kB142 kB+12 B (+0.0%)
    • forceLongPolling

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • forceWebSockets

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • get

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps155 kB155 kB+12 B (+0.0%)
    • getDatabase

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps147 kB147 kB+12 B (+0.0%)
    • goOffline

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • goOnline

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • increment

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • limitToFirst

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB117 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • limitToLast

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB117 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • off

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size124 kB124 kB+12 B (+0.0%)
      size-with-ext-deps147 kB147 kB+12 B (+0.0%)
    • onChildAdded

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps156 kB156 kB+12 B (+0.0%)
    • onChildChanged

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps156 kB156 kB+12 B (+0.0%)
    • onChildMoved

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps156 kB156 kB+12 B (+0.0%)
    • onChildRemoved

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps156 kB156 kB+12 B (+0.0%)
    • onDisconnect

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size120 kB120 kB+12 B (+0.0%)
      size-with-ext-deps142 kB142 kB+12 B (+0.0%)
    • onValue

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size133 kB133 kB+12 B (+0.0%)
      size-with-ext-deps156 kB156 kB+12 B (+0.0%)
    • orderByChild

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • orderByKey

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • orderByPriority

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • orderByValue

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • push

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • query

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • ref

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • refFromURL

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • remove

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • runTransaction

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size135 kB135 kB+12 B (+0.0%)
      size-with-ext-deps158 kB158 kB+12 B (+0.0%)
    • serverTimestamp

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size116 kB116 kB+12 B (+0.0%)
      size-with-ext-deps138 kB138 kB+12 B (+0.0%)
    • set

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps139 kB139 kB+12 B (+0.0%)
    • setPriority

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size117 kB117 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • setWithPriority

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps140 kB140 kB+12 B (+0.0%)
    • startAfter

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size119 kB119 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • startAt

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)
    • update

      Size

      TypeBase (dafae52)Merge (3d1dae9)Diff
      size118 kB118 kB+12 B (+0.0%)
      size-with-ext-deps141 kB141 kB+12 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/eDJRNstthk.html

@@ -0,0 +1,106 @@
/**
* @license
* Copyright 2023 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright 2025.

@@ -513,8 +513,18 @@ export interface ActionCodeSettings {
*
*
* @defaultValue The first domain is automatically selected.
*
* @deprecated Firebase Dynamic Links is deprecated. Migrate to use Firebase Hosting link and use
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hsubox76 @DellaBitta Is this the correct way to mark an API as deprecated?

Using @deprecated generates "Warning: This API is now obsolete" in the refdocs, as shown in this example. But,I agree with @rachelsaunders's comment that "obsolete" isn't the right word.

On the other hand, simply put "Deprecated." (no @ tag) will not make it stand out in the refdocs, as shown in this example, and developers probably won't see the deprecated warning during build time when using this API.

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

Successfully merging this pull request may close these issues.

6 participants