Skip to main content
added 2 characters in body
Source Link
Fedor
  • 24.7k
  • 45
  • 59
  • 188

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"); } 

}

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"); 

}

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"); } 
added 226 characters in body
Source Link

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"); 

}

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); } } 

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"); 

}

Source Link

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); } }