Skip to content

Commit

Permalink
switched to firebaase auth signinwithpopup amid ios16 trusted types i…
Browse files Browse the repository at this point in the history
…ssue 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
  • Loading branch information
GoloisaNinja committed Feb 26, 2023
1 parent ad6376e commit 5ccef7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Components/Toolbar/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import db, {
set,
provider,
getAuth,
signInWithRedirect,
//signInWithRedirect, iOS 16+ auth issues makes this return empty user - popup quick fix for now
signInWithPopup,
signOut,
} from '../../Firebase/firebase';

Expand Down Expand Up @@ -91,7 +92,7 @@ const Toolbar = ({
const handleLogin = () => {
console.log('handle login called');
const auth = getAuth();
signInWithRedirect(auth, provider);
signInWithPopup(auth, provider);
};

// I MEAN - THIS LOGS YOU OUT...
Expand Down
2 changes: 2 additions & 0 deletions src/Firebase/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getDatabase, ref, onValue, set, get, child } from 'firebase/database';
import {
getAuth,
signInWithRedirect,
signInWithPopup,
getRedirectResult,
signOut,
GoogleAuthProvider,
Expand Down Expand Up @@ -42,6 +43,7 @@ export {
onValue,
getAuth,
signInWithRedirect,
signInWithPopup,
getRedirectResult,
signOut,
GoogleAuthProvider,
Expand Down

0 comments on commit 5ccef7d

Please sign in to comment.