I'm building a Chrome extension in JavaScript, where I'm using Firebase authentication with Google:
const credential = GoogleAuthProvider.credential(null, token);Since I'm running this in an extension, I cannot use signinWithPopup because window is not defined. Using signInWithCredential works fine, but what I'm trying to achieve is to have the users select their Google account each time they login, but Firebase unfortunately remembers them and automatically use the latest account.
I saw that you can create a new instance of Google provider and tell Google to show the user account selection:
const provider = new GoogleAuthProvider();But then if I have that instance, how can I use it with the function signInWithCredential?
Something totally different I tried was to revoke the user auth token with a GET request to "https://accounts.google.com/o/oauth2/revoke?token=myToken", but then revoking the user token will just show again the consent popup with the exact same remembered email. So everything I tried related to revoking user auth will only result in showing the consent popup of the exact same email which is not helpful.
I'm really lost, does anyone know how to solve this?
Thanks