Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

324
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!