Skip to content

Commit e417f61

Browse files
committed
Formatting
1 parent 92e9fca commit e417f61

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

packages-exp/auth-compat-exp/src/auth.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ describe('auth compat', () => {
4747
if (typeof self !== 'undefined') {
4848
underlyingAuth._initializationPromise = Promise.resolve();
4949
sinon.stub(underlyingAuth, '_getPersistence').returns('TEST');
50-
sinon.stub(underlyingAuth, '_initializationPromise').value(Promise.resolve());
51-
sinon.stub(exp._getInstance<exp.PopupRedirectResolverInternal>(CompatPopupRedirectResolver), '_openRedirect');
50+
sinon
51+
.stub(underlyingAuth, '_initializationPromise')
52+
.value(Promise.resolve());
53+
sinon.stub(
54+
exp._getInstance<exp.PopupRedirectResolverInternal>(
55+
CompatPopupRedirectResolver
56+
),
57+
'_openRedirect'
58+
);
5259
const authCompat = new Auth(app, underlyingAuth);
5360
// eslint-disable-next-line @typescript-eslint/no-floating-promises
5461
await authCompat.signInWithRedirect(new exp.GoogleAuthProvider());

packages-exp/auth-compat-exp/src/auth.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ import {
2525
Unsubscribe
2626
} from '@firebase/util';
2727

28-
import { _validatePersistenceArgument, Persistence, _getPersistenceFromRedirect, _savePersistenceForRedirect } from './persistence';
28+
import {
29+
_validatePersistenceArgument,
30+
Persistence,
31+
_getPersistenceFromRedirect,
32+
_savePersistenceForRedirect
33+
} from './persistence';
2934
import { _isPopupRedirectSupported } from './platform';
3035
import { CompatPopupRedirectResolver } from './popup_redirect';
3136
import { User } from './user';
@@ -293,7 +298,7 @@ export class Auth
293298
this.auth,
294299
exp.AuthErrorCode.OPERATION_NOT_SUPPORTED
295300
);
296-
301+
297302
await _savePersistenceForRedirect(this.auth);
298303
return exp.signInWithRedirect(
299304
this.auth,

packages-exp/auth-compat-exp/src/persistence.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export function _validatePersistenceArgument(
8181
);
8282
}
8383

84-
export async function _savePersistenceForRedirect(auth: AuthInternal): Promise<void> {
84+
export async function _savePersistenceForRedirect(
85+
auth: AuthInternal
86+
): Promise<void> {
8587
await auth._initializationPromise;
8688

8789
const win = getSelfWindow();
@@ -95,7 +97,9 @@ export async function _savePersistenceForRedirect(auth: AuthInternal): Promise<v
9597
}
9698
}
9799

98-
export function _getPersistenceFromRedirect(auth: AuthInternal): exp.Persistence | null {
100+
export function _getPersistenceFromRedirect(
101+
auth: AuthInternal
102+
): exp.Persistence | null {
99103
const win = getSelfWindow();
100104
if (!win?.sessionStorage) {
101105
return null;
@@ -124,4 +128,4 @@ export function _getPersistenceFromRedirect(auth: AuthInternal): exp.Persistence
124128

125129
function getSelfWindow(): Window | null {
126130
return typeof window !== 'undefined' ? window : null;
127-
}
131+
}

packages-exp/auth-compat-exp/src/user.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ export class User implements compat.User, Wrapper<exp.User> {
146146
)
147147
);
148148
}
149-
async reauthenticateWithRedirect(provider: compat.AuthProvider): Promise<void> {
149+
async reauthenticateWithRedirect(
150+
provider: compat.AuthProvider
151+
): Promise<void> {
150152
await _savePersistenceForRedirect(exp._castAuth(this.auth));
151153
return exp.reauthenticateWithRedirect(
152154
this.user,

0 commit comments

Comments
 (0)