Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NhienLam committed Jan 29, 2025
1 parent 44e1a36 commit a370e9a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .changeset/polite-lies-vanish.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
'@firebase/auth': minor
---

[feature] Added `ActionCodeSettings.linkDomain` to customize the Firebase Hosting link domain that
is used in mobile out-of-band email action flows. Also, deprecated
`ActionCodeSettings.dynamicLinkDomain`.
Added `ActionCodeSettings.linkDomain` to customize the Firebase Hosting link domain that is used in mobile out-of-band email action flows. Also, deprecated `ActionCodeSettings.dynamicLinkDomain`.
6 changes: 3 additions & 3 deletions docs-devsite/auth.actioncodesettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ActionCodeSettings
| [dynamicLinkDomain](./auth.actioncodesettings.md#actioncodesettingsdynamiclinkdomain) | string | When multiple custom dynamic link domains are defined for a project, specify which one to use when the link is to be opened via a specified mobile app (for example, <code>example.page.link</code>). |
| [handleCodeInApp](./auth.actioncodesettings.md#actioncodesettingshandlecodeinapp) | boolean | When set to true, the action code link will be be sent as a Universal Link or Android App Link and will be opened by the app if installed. |
| [iOS](./auth.actioncodesettings.md#actioncodesettingsios) | { bundleId: string; } | Sets the iOS bundle ID. |
| [linkDomain](./auth.actioncodesettings.md#actioncodesettingslinkdomain) | string | The optional custom Firebase Hosting domain to use when the link is to be opened via a specified mobile app. The domain must be configured in Firebase Hosting and owned by the project. This cannot be a default hosting domain (web.app or firebaseapp.com). |
| [linkDomain](./auth.actioncodesettings.md#actioncodesettingslinkdomain) | string | The optional custom Firebase Hosting domain to use when the link is to be opened via a specified mobile app. The domain must be configured in Firebase Hosting and owned by the project. This cannot be a default Hosting domain (<code>web.app</code> or <code>firebaseapp.com</code>). |
| [url](./auth.actioncodesettings.md#actioncodesettingsurl) | string | Sets the link continue/state URL. |

## ActionCodeSettings.android
Expand Down Expand Up @@ -90,7 +90,7 @@ iOS?: {

## ActionCodeSettings.linkDomain

The optional custom Firebase Hosting domain to use when the link is to be opened via a specified mobile app. The domain must be configured in Firebase Hosting and owned by the project. This cannot be a default hosting domain (web.app or firebaseapp.com).
The optional custom Firebase Hosting domain to use when the link is to be opened via a specified mobile app. The domain must be configured in Firebase Hosting and owned by the project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`<!-- -->).

<b>Signature:</b>

Expand All @@ -102,7 +102,7 @@ linkDomain?: string;

Sets the link continue/state URL.

This has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the `continueUrl` query parameter. - When the link is handled in the app directly, this is the `continueUrl` query parameter in the deep link of the Dynamic Link or Hosting Link.
This has different meanings in different contexts: - When the link is handled in the web action widgets, this is the deep link in the `continueUrl` query parameter. - When the link is handled in the app directly, this is the `continueUrl` query parameter in the deep link of the Dynamic Link or Hosting link.

<b>Signature:</b>

Expand Down
4 changes: 2 additions & 2 deletions packages/auth/src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ function _debugErrorMap(): ErrorMap<AuthErrorCode> {
[AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS]:
'The password does not meet the requirements.',
[AuthErrorCode.INVALID_HOSTING_LINK_DOMAIN]:
'The provided hosting link domain is not configured in Firebase Hosting or is not owned by ' +
'the current project. This cannot be a default hosting domain (web.app or firebaseapp.com).'
'The provided Hosting link domain is not configured in Firebase Hosting or is not owned by ' +
'the current project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`).'
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('core/strategies/action_code_settings', () => {
).to.throw(FirebaseError, '(auth/invalid-dynamic-link-domain)');
});

it('should require a non empty hosting link URL', () => {
it('should require a non empty Hosting link URL', () => {
expect(() =>
_setActionCodeSettingsOnRequest(auth, request, {
handleCodeInApp: true,
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/src/model/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ export interface ActionCodeSettings {
* - When the link is handled in the web action widgets, this is the deep link in the
* `continueUrl` query parameter.
* - When the link is handled in the app directly, this is the `continueUrl` query parameter in
* the deep link of the Dynamic Link or Hosting Link.
* the deep link of the Dynamic Link or Hosting link.
*/
url: string;
/**
Expand All @@ -521,8 +521,8 @@ export interface ActionCodeSettings {
/**
* The optional custom Firebase Hosting domain to use when the link is to be opened via
* a specified mobile app. The domain must be configured in Firebase Hosting and owned
* by the project. This cannot be a default hosting domain (web.app or firebaseapp.com).
* @defaultValue The default hosting domain will be used (for example, `example.firebaseapp.com`)
* by the project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`).
* @defaultValue The default Hosting domain will be used (for example, `example.firebaseapp.com`)
*/
linkDomain?: string;
}
Expand Down

0 comments on commit a370e9a

Please sign in to comment.