Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-cheetahs-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/auth': patch
---

Fixed: `ActionCodeURL` not populating `languageCode` from the url.
14 changes: 7 additions & 7 deletions packages/auth/src/core/action_code_url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('core/action_code_url', () => {
'oobCode=CODE&mode=signIn&apiKey=API_KEY&' +
'continueUrl=' +
encodeURIComponent(continueUrl) +
'&languageCode=en&tenantId=TENANT_ID&state=bla';
'&lang=en&tenantId=TENANT_ID&state=bla';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(ActionCodeOperation.EMAIL_SIGNIN);
expect(actionCodeUrl!.code).to.eq('CODE');
Expand All @@ -46,7 +46,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=signIn&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.EMAIL_SIGNIN
Expand All @@ -57,7 +57,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=verifyAndChangeEmail&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL
Expand All @@ -68,7 +68,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=verifyEmail&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.VERIFY_EMAIL
Expand All @@ -79,7 +79,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=recoverEmail&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.RECOVER_EMAIL
Expand All @@ -90,7 +90,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=resetPassword&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.PASSWORD_RESET
Expand All @@ -101,7 +101,7 @@ describe('core/action_code_url', () => {
const actionLink =
'https://www.example.com/finishSignIn?' +
'oobCode=CODE&mode=revertSecondFactorAddition&apiKey=API_KEY&' +
'languageCode=en';
'lang=en';
const actionCodeUrl = ActionCodeURL.parseLink(actionLink);
expect(actionCodeUrl!.operation).to.eq(
ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/core/action_code_url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const enum QueryField {
API_KEY = 'apiKey',
CODE = 'oobCode',
CONTINUE_URL = 'continueUrl',
LANGUAGE_CODE = 'languageCode',
LANGUAGE_CODE = 'lang',
MODE = 'mode',
TENANT_ID = 'tenantId'
}
Expand Down
Loading