Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions vessel/src/lib/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@
export function shouldUseSessionAuthPersistence(
userAgent: string | undefined = typeof navigator === 'undefined' ? undefined : navigator.userAgent,
): boolean {
// If running on a first-party auth domain (bypassing ITP), we can safely use
// local persistence without IndexedDB cross-site hanging.
if (
typeof window !== 'undefined' &&

Check warning on line 156 in vessel/src/lib/firebase.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `globalThis.window` over `window`.

See more on https://sonarcloud.io/project/issues?id=DHCross_Shipyard&issues=AZ8RbcOOB9efT_Y3iA7v&open=AZ8RbcOOB9efT_Y3iA7v&pullRequest=888
(window.location.hostname === 'ravencalder.com' ||

Check warning on line 157 in vessel/src/lib/firebase.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=DHCross_Shipyard&issues=AZ8RbcOOB9efT_Y3iA7w&open=AZ8RbcOOB9efT_Y3iA7w&pullRequest=888
window.location.hostname === 'www.ravencalder.com')

Check warning on line 158 in vessel/src/lib/firebase.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=DHCross_Shipyard&issues=AZ8RbcOOB9efT_Y3iA7x&open=AZ8RbcOOB9efT_Y3iA7x&pullRequest=888
) {
return false;
}
if (!userAgent) return false;

// Every iOS browser shell uses WebKit; IndexedDB stalls the same as Safari.
Expand Down
Loading