I would like to use Firebase Auth to authenticate mobile phone clients, but I have an existing PostgreSQL database with lots of functions and triggers that I do not want to convert to NoSQL. Is it possible to authenticate users with Firebase and then allow them to read and write data to the PostgreSQL database securely? What would be the proper way to do this? I come from a web development background so I'm used to session-based authentication instead of token-based authentication. Trying to wrap my head around it.
Firebase SQL Server Integration is a process that helps you quickly transfer data between Firebase and SQL Server. It plays a vital role when you are designing applications or websites on Firebase and are using SQL Server as your database.
After authentication, create a child with the UID given by Firebase, and set its value to your user class: //get firebase user FirebaseUser user = FirebaseAuth. getInstance(). getCurrentUser(); //get reference DatabaseReference ref = FirebaseDatabase.
Auth0, MongoDB, Passport, Okta, and Firebase are the most popular alternatives and competitors to Firebase Authentication.
If you already have a backend talking to your PostgreSQL database, you can get a token with user.getToken()
(https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser#public-constructor-summary) and then verify the token on your backend (https://firebase.google.com/docs/auth/server#verify_id_tokens). Then, use the uid
from the token as the user's ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With