Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

323
Vistas
How to turn anonymous user to permanent If an anonymous user confirmed his email?

Is it possible to have a non-anonymous user? I want to have a passwordless email only signin, the user receives an email and confirm his email. Then I want to toggle isAnonymous to false.

My code:

const { user } = await signInAnonymously(auth)
await updateEmail(user, email)
await sendEmailVerification(user)
setInterval(() => auth.currentUser.reload(), 2000)

As you can see the user verified his email but still isAnonymous

Edit

Not possible, the user won't be able to sign in. Every time the user tries to sign in he will create a new anonymous user which when updating the user (await updateEmail(user, email)) will result in auth/email-already-in-use.

Needs Firebase to implement a true passwordless way.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to change your authentication mechanism here.

First, you need to create a custom Endpoint to check the user's email address on the backend and in response the backend will send firebase custom token using Firebase admin SDK. This is a JWT token which will be used on the frontend for authenticating with firebase.

const uid = 'user-email';
getAuth()
    .createCustomToken(uid)
    .then((customToken) => {
        // Send token back to client
     })
    .catch((error) => {
        console.log('Error creating custom token:', error);
    });

Secondly, on the frontend your application will authenticate with firebase using the following Firebase Client method.

firebase.auth().signInWithCustomToken(token)
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda