File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/auth/src/core/strategies Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ import { EmailAuthProvider } from '../providers/email';
3131import { UserCredentialImpl } from '../user/user_credential_impl' ;
3232import {
3333 _assert ,
34+ _errorWithCustomMessage ,
3435 _serverAppCurrentUserOperationNotSupportedError
3536} from '../util/assert' ;
3637import { _setActionCodeSettingsOnRequest } from './action_code_settings' ;
3738import { signInWithCredential } from './credential' ;
38- import { _castAuth } from '../auth/auth_impl' ;
39+ import { _castAuth , DefaultConfig } from '../auth/auth_impl' ;
3940import { AuthErrorCode } from '../errors' ;
4041import { getModularInstance } from '@firebase/util' ;
4142import { OperationType } from '../../model/enums' ;
@@ -352,6 +353,15 @@ export function signInWithEmailAndPassword(
352353 _serverAppCurrentUserOperationNotSupportedError ( auth )
353354 ) ;
354355 }
356+
357+ if ( auth . config . apiHost !== DefaultConfig . API_HOST ) {
358+ return Promise . reject ( _errorWithCustomMessage (
359+ auth ,
360+ AuthErrorCode . OPERATION_NOT_ALLOWED ,
361+ "The method is not implemented in Regionalized Auth"
362+ ) ) ;
363+ }
364+
355365 return signInWithCredential (
356366 getModularInstance ( auth ) ,
357367 EmailAuthProvider . credential ( email , password )
You can’t perform that action at this time.
0 commit comments