Skip to content

Commit e7b7bfa

Browse files
committed
Fix circular dependency issue
1 parent e22885d commit e7b7bfa

File tree

4 files changed

+8
-30
lines changed

4 files changed

+8
-30
lines changed

packages-exp/auth-exp/src/core/credentials/auth_credential.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import { PhoneOrOauthTokenResponse } from '../../api/authentication/mfa';
1919
import { AuthCore } from '../../model/auth';
2020
import { IdTokenResponse } from '../../model/id_token';
21-
import { EmailAuthCredential, OAuthCredential, PhoneAuthCredential } from './';
2221
import { debugFail } from '../util/assert';
2322

2423
export class AuthCredential {
@@ -27,21 +26,6 @@ export class AuthCredential {
2726
readonly signInMethod: string
2827
) {}
2928

30-
static fromJSON(json: object | string): AuthCredential | null {
31-
for (const fn of [
32-
/* SAMLAuthCredential.fromJSON, */
33-
OAuthCredential.fromJSON,
34-
EmailAuthCredential.fromJSON,
35-
PhoneAuthCredential.fromJSON
36-
]) {
37-
const credential = fn(json);
38-
if (credential) {
39-
return credential;
40-
}
41-
}
42-
return null;
43-
}
44-
4529
toJSON(): object {
4630
return debugFail('not implemented');
4731
}

packages-exp/auth-exp/src/core/credentials/email.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ import * as externs from '@firebase/auth-types-exp';
2020
import { updateEmailPassword } from '../../api/account_management/email_and_password';
2121
import { signInWithPassword } from '../../api/authentication/email_and_password';
2222
import {
23-
signInWithEmailLink,
24-
signInWithEmailLinkForLinking
23+
signInWithEmailLink, signInWithEmailLinkForLinking
2524
} from '../../api/authentication/email_link';
2625
import { AuthCore } from '../../model/auth';
2726
import { IdTokenResponse } from '../../model/id_token';
2827
import { AuthErrorCode } from '../errors';
2928
import { fail } from '../util/assert';
30-
import { AuthCredential } from './';
29+
import { AuthCredential } from './auth_credential';
3130

3231
export class EmailAuthCredential
3332
extends AuthCredential

packages-exp/auth-exp/src/core/credentials/oauth.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818
import * as externs from '@firebase/auth-types-exp';
1919
import { querystring } from '@firebase/util';
2020

21-
import {
22-
signInWithIdp,
23-
SignInWithIdpRequest
24-
} from '../../api/authentication/idp';
21+
import { signInWithIdp, SignInWithIdpRequest } from '../../api/authentication/idp';
2522
import { AuthCore } from '../../model/auth';
23+
import { IdTokenResponse } from '../../model/id_token';
2624
import { AuthErrorCode } from '../errors';
2725
import { fail } from '../util/assert';
28-
import { AuthCredential } from './';
29-
import { IdTokenResponse } from '../../model/id_token';
26+
import { AuthCredential } from './auth_credential';
3027

3128
const IDP_REQUEST_URI = 'http://localhost';
3229

packages-exp/auth-exp/src/core/credentials/phone.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ import * as externs from '@firebase/auth-types-exp';
1919

2020
import { PhoneOrOauthTokenResponse } from '../../api/authentication/mfa';
2121
import {
22-
linkWithPhoneNumber,
23-
signInWithPhoneNumber,
24-
SignInWithPhoneNumberRequest,
25-
verifyPhoneNumberForExisting
22+
linkWithPhoneNumber, signInWithPhoneNumber, SignInWithPhoneNumberRequest,
23+
verifyPhoneNumberForExisting
2624
} from '../../api/authentication/sms';
2725
import { AuthCore } from '../../model/auth';
2826
import { IdTokenResponse } from '../../model/id_token';
29-
import { AuthCredential } from './';
27+
import { AuthCredential } from './auth_credential';
3028

3129
export interface PhoneAuthCredentialParameters {
3230
verificationId?: string;

0 commit comments

Comments
 (0)