I have the same case, without using Cloud functions I found one solution, it is not the most optimal, but it works. The essence of the solution: After registration, immediately log out.
if (!isRegistering) { setIsRegistering(true); try { /* if(!user){ throw Error("Telegram orqali kiring brodar") } */ const response = await doCreateUserWithEmailAndPassword(email, password); doSendEmailVerification(); logout() } catch (error) { setErrorMessage(error.message); } finally { setIsRegistering(false); } } And my logout() function:
async function logout() { await doSignOut(); setCurrentUser(null); setUserLoggedIn(false); setIsEmailUser(false); setLoading(false); navigate("/login"); } }