Skip to content

Commit 5ccef7d

Browse files
committed
switched to firebaase auth signinwithpopup amid ios16 trusted types issue that is returning empty users when signinwithredirect is used - this is not a permanent solution as the signinwithpopup is rife with issues on mobile either being blocked by popup blockers for various users etc - hoping to see some issue clearance from the webkit team soon - github issue ref is firebase/firebase-js-sdk#6716
1 parent ad6376e commit 5ccef7d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Components/Toolbar/toolbar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import db, {
1818
set,
1919
provider,
2020
getAuth,
21-
signInWithRedirect,
21+
//signInWithRedirect, iOS 16+ auth issues makes this return empty user - popup quick fix for now
22+
signInWithPopup,
2223
signOut,
2324
} from '../../Firebase/firebase';
2425

@@ -91,7 +92,7 @@ const Toolbar = ({
9192
const handleLogin = () => {
9293
console.log('handle login called');
9394
const auth = getAuth();
94-
signInWithRedirect(auth, provider);
95+
signInWithPopup(auth, provider);
9596
};
9697

9798
// I MEAN - THIS LOGS YOU OUT...

src/Firebase/firebase.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { getDatabase, ref, onValue, set, get, child } from 'firebase/database';
44
import {
55
getAuth,
66
signInWithRedirect,
7+
signInWithPopup,
78
getRedirectResult,
89
signOut,
910
GoogleAuthProvider,
@@ -42,6 +43,7 @@ export {
4243
onValue,
4344
getAuth,
4445
signInWithRedirect,
46+
signInWithPopup,
4547
getRedirectResult,
4648
signOut,
4749
GoogleAuthProvider,

0 commit comments

Comments
 (0)