I have no front end. I want users to use my API e.g (postman) with a basic auth header (email:password) and then using this header I can get the users data from firebase.
however I find no method to authenticate the actual user?
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>6.11.0</version>
</dependency>
I have correctly connected to DB using
FileInputStream serviceAccount =
new FileInputStream("path/to/serviceAccountKey.json");
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("https://DBNAME.firebaseio.com")
.build();
FirebaseApp.initializeApp(options);
I have tried to look into the methods:
FirebaseAuth.getInstance().
FirebaseDatabase.getInstance().
but I see no options to sign in the user from my server...
seems very easy from nodejs server... e.g
firebase.auth().signInWithEmailAndPassword(email, password)
does this method exist in java/ how can I do this in java for server and no client??