Skip to content

Commit

Permalink
[Auth] Fix incorrectly-cased parameter in OOB request (#5542)
Browse files Browse the repository at this point in the history
* Fix incorrect casing on iOSBundleId in action_code_settings

* Fix tests

* Add changeset
  • Loading branch information
sam-gc committed Sep 27, 2021
1 parent 316638a commit 49b0406
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-items-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/auth": patch
---

Fix incorrectly-cased parameter in out-of-band request that was causing incorrect behavior in some cases
2 changes: 1 addition & 1 deletion packages/auth/src/api/authentication/email_and_password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function signInWithPassword(
export interface GetOobCodeRequest {
email?: string; // Everything except VERIFY_AND_CHANGE_EMAIL
continueUrl?: string;
iosBundleId?: string;
iOSBundleId?: string;
iosAppStoreId?: string;
androidPackageName?: string;
androidInstallApp?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/core/strategies/action_code_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function _setActionCodeSettingsOnRequest(
auth,
AuthErrorCode.MISSING_IOS_BUNDLE_ID
);
request.iosBundleId = actionCodeSettings.iOS.bundleId;
request.iOSBundleId = actionCodeSettings.iOS.bundleId;
}

if (actionCodeSettings.android) {
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/src/core/strategies/email.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('core/strategies/sendEmailVerification', () => {
continueUrl: 'my-url',
dynamicLinkDomain: 'fdl-domain',
canHandleCodeInApp: true,
iosBundleId: 'my-bundle'
iOSBundleId: 'my-bundle'
});
});
});
Expand Down Expand Up @@ -280,7 +280,7 @@ describe('core/strategies/verifyBeforeUpdateEmail', () => {
continueUrl: 'my-url',
dynamicLinkDomain: 'fdl-domain',
canHandleCodeInApp: true,
iosBundleId: 'my-bundle'
iOSBundleId: 'my-bundle'
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('core/strategies/sendPasswordResetEmail', () => {
continueUrl: 'my-url',
dynamicLinkDomain: 'fdl-domain',
canHandleCodeInApp: true,
iosBundleId: 'my-bundle'
iOSBundleId: 'my-bundle'
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/core/strategies/email_link.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('core/strategies/sendSignInLinkToEmail', () => {
continueUrl: 'my-url',
dynamicLinkDomain: 'fdl-domain',
canHandleCodeInApp: true,
iosBundleId: 'my-bundle'
iOSBundleId: 'my-bundle'
});
});
});
Expand Down

0 comments on commit 49b0406

Please sign in to comment.