Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] Can Firebase phone number OTP auth be used for creating a user (registration/signup) in Firestore database in Flutter? If yes, how? (android)

Posted on November 14, 2022

Solution 1 :

I am not sure whether phone auth (OTP) in Flutter can be used to create a user along with their details in Firestore. Or whether it can only used for user authentication.

Sign-ins using Firebase Authentication only create a user account that’s visible within the Firebase Auth product. It has nothing to do with Firestore. This is true for all type of authentication with Firebase Auth.

If you want to add user details to a document in Firestore, you’re going to have to write code to do that.

Solution 2 :

This is a bad response – the original poster is asking if it is possible to create a new FirebaseAuth record using just the Phone + OTP process, and not using the createUserWithEmailAndPassword call, not how to store custom user data in Firestore

Problem :

What I am trying to achieve is:

  1. An app that does not require email id at all for registration/signup, or login.
  2. Registration page that requires user to fill their name, phone number and a few other details.
  3. When user presses send OTP on the registration page, the number gets verified and a user profile is created in Firestore, and his details are saved.
  4. If the user logs out, on login page user must be able to enter phone number, get OTP sent again, and be logged in into the same account.

Issue:

I am not sure whether phone auth (OTP) in Flutter can be used to create a user along with their details in Firestore. Or whether it can only used for user authentication.

If it is possible to use phone number (OTP) auth to create user profile in Firestore in Flutter, please help.

Most tutorials I referred to, only show how phone authentication can be done using OTP, but do not cover creating a profile using the same.

READ  [ANSWERED] Android, delete item in list and in sqllite java
Powered by Inline Related Posts

Comments

Comment posted by Amethyst

I’m new to flutter, so please help me out here… To add user details using email and password from my signup to Firestore document, I’d use

Comment posted by Doug Stevenson

createUserWithEmailAndPassword does not do anything with Firestore. It only creates a user account in Firebase Authentication. I suggest following the documentation for phone auth if you’re having problems setting that up. No matter how you sign in the user, adding a document to Firestore will be a completely different task.

Comment posted by Amethyst

Ohkay…I’ll do that…Thanks a lot! 🙂

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress