@@ -54,7 +54,7 @@ export const enum HttpHeader {
54
54
X_FIREBASE_APP_CHECK = 'X-Firebase-AppCheck'
55
55
}
56
56
57
- export enum Endpoint {
57
+ export const enum Endpoint {
58
58
CREATE_AUTH_URI = '/v1/accounts:createAuthUri' ,
59
59
DELETE_ACCOUNT = '/v1/accounts:delete' ,
60
60
RESET_PASSWORD = '/v1/accounts:resetPassword' ,
@@ -155,7 +155,6 @@ async function performApiRequest<T, V>(
155
155
request ?: T ,
156
156
customErrorMap : Partial < ServerErrorMap < ServerError > > = { }
157
157
) : Promise < V > {
158
- _assertValidEndpointForAuth ( auth , path ) ;
159
158
return _performFetchWithErrorHandling ( auth , customErrorMap , async ( ) => {
160
159
let body = { } ;
161
160
let params = { } ;
@@ -375,22 +374,6 @@ export function _parseEnforcementState(
375
374
}
376
375
}
377
376
378
- function _assertValidEndpointForAuth (
379
- auth : Auth ,
380
- path : Endpoint | RegionalEndpoint
381
- ) : void {
382
- if (
383
- ! auth . tenantConfig &&
384
- Object . values ( RegionalEndpoint ) . includes ( path as RegionalEndpoint )
385
- ) {
386
- throw _operationNotSupportedForInitializedAuthInstance ( auth ) ;
387
- }
388
-
389
- if ( auth . tenantConfig && Object . values ( Endpoint ) . includes ( path as Endpoint ) ) {
390
- throw _operationNotSupportedForInitializedAuthInstance ( auth ) ;
391
- }
392
- }
393
-
394
377
class NetworkTimeout < T > {
395
378
// Node timers and browser timers are fundamentally incompatible, but we
396
379
// don't care about the value here
0 commit comments