Skip to content

Commit bd044d9

Browse files
authored
increase window location check specificity for Expo 53+ (#216)
1 parent 187ce7c commit bd044d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/react/client.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export function AuthProvider({
243243
const url = new URL(result.redirect);
244244
await storageSet(VERIFIER_STORAGE_KEY, result.verifier!);
245245
// Do not redirect in React Native
246-
if (window.location !== undefined) {
246+
if (window.location?.href !== undefined) {
247247
window.location.href = url.toString();
248248
}
249249
return { signingIn: false, redirect: url };
@@ -359,7 +359,7 @@ export function AuthProvider({
359359
return;
360360
}
361361
const code =
362-
typeof window?.location !== "undefined"
362+
typeof window?.location?.search !== "undefined"
363363
? new URLSearchParams(window.location.search).get("code")
364364
: null;
365365
// code from URL is only consumed initially,

0 commit comments

Comments
 (0)