Skip to content

Commit afdccd5

Browse files
authored
Allow port numbers in authdomain (#7277)
* removed assertion to check for port numbers in authdomain * adding changeset
1 parent 92e2279 commit afdccd5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.changeset/small-chairs-explain.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth': patch
3+
---
4+
5+
Allow port numbers in authDomain

packages/auth/src/core/auth/initialize.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ describe('core/auth/initialize', () => {
140140
fakeApp = initializeApp({
141141
apiKey: 'fake-key',
142142
appId: 'fake-app-id',
143-
authDomain: 'fake-auth-domain'
143+
authDomain: 'fake-auth-domain:9999'
144144
});
145145
});
146146

@@ -165,7 +165,7 @@ describe('core/auth/initialize', () => {
165165
apiHost: 'identitytoolkit.googleapis.com',
166166
apiKey: 'fake-key',
167167
apiScheme: 'https',
168-
authDomain: 'fake-auth-domain',
168+
authDomain: 'fake-auth-domain:9999',
169169
clientPlatform: expectedClientPlatform,
170170
sdkClientVersion: expectedSdkClientVersion,
171171
tokenApiHost: 'securetoken.googleapis.com'

packages/auth/src/core/auth/register.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ export function registerAuth(clientPlatform: ClientPlatform): void {
7272
AuthErrorCode.INVALID_API_KEY,
7373
{ appName: app.name }
7474
);
75-
// Auth domain is optional if IdP sign in isn't being used
76-
_assert(!authDomain?.includes(':'), AuthErrorCode.ARGUMENT_ERROR, {
77-
appName: app.name
78-
});
75+
7976
const config: ConfigInternal = {
8077
apiKey,
8178
authDomain,

0 commit comments

Comments
 (0)