Skip to content

Commit 89dfe97

Browse files
committed
formatting, again
1 parent ad9bb94 commit 89dfe97

File tree

1 file changed

+8
-4
lines changed
  • packages/auth/src/platform_browser

1 file changed

+8
-4
lines changed

packages/auth/src/platform_browser/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,21 @@ const mintCookieFactory = (url: string) => async (user: User | null) => {
4343
const idTokenAge =
4444
idTokenResult &&
4545
(new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1_000;
46-
if (idTokenAge && idTokenAge > authIdTokenMaxAge) { return; }
46+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
47+
return;
48+
}
4749
// Specifically trip null => undefined when logged out, to delete any existing cookie
4850
const idToken = idTokenResult?.token;
49-
if (lastPostedIdToken === idToken) { return; }
51+
if (lastPostedIdToken === idToken) {
52+
return;
53+
}
5054
lastPostedIdToken = idToken;
5155
await fetch(url, {
5256
method: idToken ? 'POST' : 'DELETE',
5357
headers: idToken
5458
? {
55-
'Authorization': `Bearer ${idToken}`
56-
}
59+
'Authorization': `Bearer ${idToken}`
60+
}
5761
: {}
5862
});
5963
};

0 commit comments

Comments
 (0)