Skip to content

Commit

Permalink
Merge d8b4450 into 92e2279
Browse files Browse the repository at this point in the history
  • Loading branch information
bhparijat authored May 5, 2023
2 parents 92e2279 + d8b4450 commit ad4c44d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-chairs-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/auth': patch
---

Allow port numbers in authDomain
4 changes: 2 additions & 2 deletions packages/auth/src/core/auth/initialize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
});

Expand All @@ -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'
Expand Down
5 changes: 1 addition & 4 deletions packages/auth/src/core/auth/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ad4c44d

Please sign in to comment.