my friend I'm pretty sure signInWithRedirect is gonna stop working soon (or already stopped), but I'm not 100% sure. I think I saw that in google auth interface.
If that come to be true, what about you use popUp?
const provider = new GoogleAuthProvider();
try {
const result = await signInWithPopup(auth, provider);
const user = result.user;
if(!user.uid){
console.log("Erro");
setExibirErro("Erro login google.");
return
}
const { displayName, email, uid, emailVerified, photoURL } = user;
const providerId = result.providerId;
const { firstName, lastName } = splitName(displayName || '');
}