0

Im develop a app. I'm using firebase and flutter. But now i would change from firebase to my own database (node.js).

Here my question:

  • Is it possible to use the firebase user authentication with my own database?
  • Or need i host a own smpt server to send the verification emails?
  • Is it possible to 'keep the user login' without firebase?
  • How i can do that?

If you have any question to me feel free to ask me. Many thx (:

1 Answer 1

2

Yes, you can use Firebase Authentication with your own database, or other backend service. You will need to implement your own server-side code that verifies the ID token from the client, and then ensures that the client is authorized to perform the operations it requests.

Sign up to request clarification or add additional context in comments.

6 Comments

Hello @Frank, im new in flutter and firebase. Have I understood that correctly? I cannot filter the user_id in the client, but have to do this on the sever? Todo this i need the firebase admin sdk? Many thx
It's hard to answer that concretely what you need to do, because your question is very light on details. For example: what database are you looking to use? Where will you host that database? How do you expect to call into that database from your Flutter code?
Hello @Frank, i'm currently still in the planning phase. I planning to out source my database to have more flexibility. A week ago i have buy a small databse (see here: SYNOLOGY DiskStation DS220+ and 1t hhd). First of all i would like to test my app, with 3 or 4 devices. I decided to use a node.js framework with Express.js. But if you have a better idea let me know. I planning to call the data about a rest service (if it's possible). It's the first time i setup a database and call data in flutter. Taht's the resson because i ask you again. If you need more information feel free to ask me (:
I also have a idea. Maybe it's possible if the user sign up i create a user in firebase. If the user is registered then I can pass the user uid to my dataserver. In my database i can call all data with the same user uid. But im not sure this way is secure? For example somebody get a other user uid he can call data from other user.
Your REST API implementation is where you'll take the ID token fro, the client, code and verify it (either with the Admin SDK or one of the many other libraries mentioned in the link), and then determine if the user is authorized to access the data they are trying to.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.