I create an app with an authentification form and database based on the Firebase. The question - "Is it possible to duplicate data with authenticated users into a permanent database somehow?"
You're asking about two products (Firebase Authentication, and Firebase Realtime Database) and the answer is quite different for each of these.
For Firebase Authentication you can export the users from one project, and import them in the other project by either using the Firebase CLI (see auth:export and auth:import or the Firebase Admin SDK (see list users and import users).
For the Firebase Realtime Database you can export any data and import it anywhere else using its API. Alternatively, if you want to duplicate the entire database, you can take one of the automated backups that Firebase can make for you, and import that into the other project in the database panel of your Firebase console.
Related
Is there a way to get all signed up users using FirebaseAuth. I know I can create users node and save users when they sign up, but I'm looking for a way to get users using something like Auth.getAllUsers since all I'm looking for is uid and displayName. I'm using swift, so admin sdk seems not supporting it.
There is no client-side API to get a list of all users, which is why many developers write details about the users into a database (such as the Firebase Realtime Database, or Cloud Firestore).
There is a server-side Admin SDK that allows listing all users. See https://firebase.google.com/docs/auth/admin/manage-users#list_all_users
You can create a cloud function that returns the results of the Admin SDK list all users function. Make sure that you remove any private data fields from the reply, though. The hashed password, salt, and providers are included in the data.
I have an iOS app and I'm using Firebase as my database.
I know a little about Firebase rules for saving data but i don't have users in my app so i just want to know -
Does Firebase encrypt or hash or secure the transaction between my app and the database?
I don't want some hacker to just easily intercept my call to Firebase and change something and my database will be updated with the wrong information.
Anybody knows the answer to that or how to do that if Firebase doesn't do it automatically?
Thank you
Traffic between your app and the Firebase database always goes over HTTPS, so in general is quite well secured.
But if you don't use authentication and security rules in your app, all a malicious user has to know is the URL of your database (https://yourapp.firebaseio.com) to be able to wreak havoc. This is the nature of a cloud-hosted service: since every client needs to have access to the service, you have to assume malicious users will also have access to the service.
For more on this, see:
How to prevent other access to my firebase
How to make firebase storage only available to users of the app
Swift: Firebase: How to ensure no one can access my db except my app
Even if the users are not anonymous, I would like to automatically delete the user authentication and user info in the database if they have not logged in for say, a year. This is to prevent old or spam accounts from taking up space in Firebase.
Is this possible without manually checking and deleting on the Firebase console?
You can use the Firebase Cloud Functions.
This sample do exactly what you need.
Here more samples for Firebase Cloud Functions.
I am upgrading my project from Firebase.com to console.firebase.google. i have follow the steps on the migration guide on the below link.
https://firebase.google.com/support/guides/firebase-ios#import_your_project_to_the_new_firebase_console_numbered
The database imported successfully but my user not able to imported from the firebase to goole console.
I need the help regarding this. Any helpful answer is highly appreciated.
From the docs
Your user data is automatically migrated to the new authentication backend. This happens in the background and your users can continue to use the app while the data is being migrated. User signups and logins will not be affected. While the system is migrating user accounts, you will see a spinner in the Auth tab of the Firebase Console.
You could wait for a while as this is a background process, and can you see a spinner in the Auth Tab to confirm users are being synced or not ?
I'm building an iOS (Swift) app that needs realtime chat as part of the functionality. While Parse works well for push, data storage, etc..., it doesn't support realtime. I would like to use Firebase for the realtime support, but need help authenticating to Firebase using a Parse user. I really don't know where to start with this. Any help would be greatly appreciated.
The question is pretty vague so a definitive answer is not possible: here's a thought.
Firebase and Parse are two different companies and therefore require separate authentications.
If your users have a username/password type authentication in Parse, you could use the same data in Firebase and authenticate through code. i.e. User creates a new account in Parse, and an account is created in Firebase via code. When the user authenticates to Parse, it also authenticates to Firebase via code.
There are a LOT of design elements to consider in going this route: how do you create a firebase user (in code) without your app authenticating itself as a 'super' user? Hard code credentials? That may be a security issue.
Are you going to keep two sets of user data? One in Parse and one in Firebase? What if a user needs to reset their password or account. As you can see, it can get out of control rather quickly.
You may want to consider sticking with one platform to simplify the entire process. By the sound of at least one of the requirements, Firebase can do much of what Parse can do but also give the real-time updates you need.