Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

353
Visualizações
How can i create user using firebase in vue without sign in?

I created a form to create a user profile. But I face an issue whenever I create a user. It logged in and already logged in user logout. Please help to solve this issue.

const successCreate = () => {
  createUserWithEmailAndPassword(auth, email.value, confirmPassword.value)
    .then(() => {
      db.collection('businessForm')
        .add({
          schoolName: schoolName.value,
          board: board.value,
          subjects: [
            subject1.value,
            subject2.value,
            subject3.value,
            subject4.value,
            subject5.value,
            subject6.value,
            subject7.value,
            subject8.value,
          ],
          email: email.value,
          street: street.value,
          city: city.value,
          state: state.value,
          mobile: mobile.value,
          telephone: telephone.value,
          isAdmin: true,
        })
        .then(() => {
          isLoading.value = false
          notyf.success('Account created successfully!')
        })
        .catch((err) => {
          isLoading.value = false
          notyf.error('Something went wrong. Try again later!')
        })
    })
    .catch((err) => {
      isLoading.value = false
      notyf.error('Something went wrong. Try again later!')
    })
}

Any solution appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

How can i create user using firebase in vue without sign in?

When you create a user through the createUserWithEmailAndPassword() method of the Client JS SDK, on success this user will also be signed in to your application, as explained in the doc. There is no way to avoid that.

If you want to avoid that the current user is logged out (signed out) and signed in as the newly created user, you need to implement a different approach, for example call a Cloud Function that creates the new user using the Admin SDK.

You may be interested by this article which presents how to build, with a Callable Cloud Function, a module for allowing end-users with a specific Admin role creating other users (disclaimer, I'm the author).

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda