Rectangle 27 0

Firebase app user registration using google?


No, you have to use firebase authentication to register and login users. You have to use the real-time database to store other information that firebase doesn't save in the "authentication". I will edit the answer.

Thanks @Utnapishtim I will look into the separate Users table but how do I register a user who will authenticate themselves via Google, Facebook, Twitter with this table? I can't seem to find an example of this.

To explain in details: you have to use firebase authentication to login and register users, after that (for example on register completion) you save user's information in the real-time database node. Then after login (with firebase authentication) you will use user's uid to get all the user's details from the real-time database. You need this also if your users can view other user's profile... you can't get another user information from the "authentication table".

Unfortunately, you can't add extra fields to FirebaseUser. You have to use "real-time database". You can create a database node called "users" and save there your user-specific fields (use FirebaseUser UID as the key for the database). Then when the user login in your app you can get their info from the database.

Note
Rectangle 27 0

Firebase app user registration using google?


No, you have to use firebase authentication to register and login users. You have to use the real-time database to store other information that firebase doesn't save in the "authentication". I will edit the answer.

Thanks @Utnapishtim I will look into the separate Users table but how do I register a user who will authenticate themselves via Google, Facebook, Twitter with this table? I can't seem to find an example of this.

To explain in details: you have to use firebase authentication to login and register users, after that (for example on register completion) you save user's information in the real-time database node. Then after login (with firebase authentication) you will use user's uid to get all the user's details from the real-time database. You need this also if your users can view other user's profile... you can't get another user information from the "authentication table".

Unfortunately, you can't add extra fields to FirebaseUser. You have to use "real-time database". You can create a database node called "users" and save there your user-specific fields (use FirebaseUser UID as the key for the database). Then when the user login in your app you can get their info from the database.

Note