Skip to content

Commit 5ee8a36

Browse files
committed
Fix IdpTask types
1 parent 02ab0de commit 5ee8a36

File tree

1 file changed

+8
-11
lines changed
  • packages-exp/auth-exp/src/core/strategies

1 file changed

+8
-11
lines changed

packages-exp/auth-exp/src/core/strategies/idp.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@
1717

1818
import * as externs from '@firebase/auth-types-exp';
1919

20-
import {
21-
signInWithIdp,
22-
SignInWithIdpRequest
23-
} from '../../api/authentication/idp';
20+
import { signInWithIdp, SignInWithIdpRequest } from '../../api/authentication/idp';
21+
import { PhoneOrOauthTokenResponse } from '../../api/authentication/mfa';
2422
import { Auth } from '../../model/auth';
23+
import { IdTokenResponse } from '../../model/id_token';
2524
import { User, UserCredential } from '../../model/user';
25+
import { AuthCredential } from '../credentials';
2626
import { _link as _linkUser } from '../user/link_unlink';
2727
import { _reauthenticate } from '../user/reauthenticate';
2828
import { assert, debugFail } from '../util/assert';
2929
import { signInWithCredential } from './credential';
30-
import { AuthCredential } from '../credentials';
31-
import { IdTokenResponse } from '../../model/id_token';
32-
import { PhoneOrOauthTokenResponse } from '../../api/authentication/mfa';
3330

3431
export interface IdpTaskParams {
3532
auth: Auth;
@@ -92,21 +89,21 @@ class IdpCredential implements AuthCredential {
9289

9390
export function _signIn(
9491
params: IdpTaskParams
95-
): Promise<externs.UserCredential> {
96-
return signInWithCredential(params.auth, new IdpCredential(params));
92+
): Promise<UserCredential> {
93+
return signInWithCredential(params.auth, new IdpCredential(params)) as Promise<UserCredential>;
9794
}
9895

9996
export function _reauth(
10097
params: IdpTaskParams
101-
): Promise<externs.UserCredential> {
98+
): Promise<UserCredential> {
10299
const { auth, user } = params;
103100
assert(user, auth.name);
104101
return _reauthenticate(user, new IdpCredential(params));
105102
}
106103

107104
export async function _link(
108105
params: IdpTaskParams
109-
): Promise<externs.UserCredential> {
106+
): Promise<UserCredential> {
110107
const { auth, user } = params;
111108
assert(user, auth.name);
112109
return _linkUser(user, new IdpCredential(params));

0 commit comments

Comments
 (0)