From d3ebdd45d9a0c784f4d3847bd2c01843e6b78c32 Mon Sep 17 00:00:00 2001 From: Parijat bhatt Date: Thu, 4 May 2023 13:26:36 -0700 Subject: [PATCH 1/2] removed assertion to check for port numbers in authdomain --- packages/auth/src/core/auth/register.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/auth/src/core/auth/register.ts b/packages/auth/src/core/auth/register.ts index 1d779421c89..c203d682d00 100644 --- a/packages/auth/src/core/auth/register.ts +++ b/packages/auth/src/core/auth/register.ts @@ -72,10 +72,7 @@ export function registerAuth(clientPlatform: ClientPlatform): void { AuthErrorCode.INVALID_API_KEY, { appName: app.name } ); - // Auth domain is optional if IdP sign in isn't being used - _assert(!authDomain?.includes(':'), AuthErrorCode.ARGUMENT_ERROR, { - appName: app.name - }); + const config: ConfigInternal = { apiKey, authDomain, From d8b4450d362802784d3b8427e7dfb85cc185f7e9 Mon Sep 17 00:00:00 2001 From: Parijat bhatt Date: Thu, 4 May 2023 14:05:10 -0700 Subject: [PATCH 2/2] adding changeset --- .changeset/small-chairs-explain.md | 5 +++++ packages/auth/src/core/auth/initialize.test.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/small-chairs-explain.md diff --git a/.changeset/small-chairs-explain.md b/.changeset/small-chairs-explain.md new file mode 100644 index 00000000000..88f41ce72a6 --- /dev/null +++ b/.changeset/small-chairs-explain.md @@ -0,0 +1,5 @@ +--- +'@firebase/auth': patch +--- + +Allow port numbers in authDomain diff --git a/packages/auth/src/core/auth/initialize.test.ts b/packages/auth/src/core/auth/initialize.test.ts index efdec7f1ef1..5ca5fa6eb52 100644 --- a/packages/auth/src/core/auth/initialize.test.ts +++ b/packages/auth/src/core/auth/initialize.test.ts @@ -140,7 +140,7 @@ describe('core/auth/initialize', () => { fakeApp = initializeApp({ apiKey: 'fake-key', appId: 'fake-app-id', - authDomain: 'fake-auth-domain' + authDomain: 'fake-auth-domain:9999' }); }); @@ -165,7 +165,7 @@ describe('core/auth/initialize', () => { apiHost: 'identitytoolkit.googleapis.com', apiKey: 'fake-key', apiScheme: 'https', - authDomain: 'fake-auth-domain', + authDomain: 'fake-auth-domain:9999', clientPlatform: expectedClientPlatform, sdkClientVersion: expectedSdkClientVersion, tokenApiHost: 'securetoken.googleapis.com'