I want to use both Firebase Auth
and Firebase Admin
dependency in my project. So i have added below dependency
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-admin:6.12.2'
But i can't use below method from firebase auth
FirebaseAuth.getInstance().getCurrentUser();
FirebaseAuth.getInstance().signOut();
I can only have methods of FirebaseAuth
from firebase-admin
dependency.
Some available methods are:
FirebaseAuth.getInstance().getUser(uid);
FirebaseAuth.getInstance().deleteUser(uid);
If i remove firebase-admin
dependency I can use getCurrentUser
, signOut
and other methods from firebase-auth
Its like both dependency have same package FirebaseAuth class with different implementation. With some search i found that firebase-admin
is for server side.
Is that means i can't use
firebase-admin
and firebase-auth in same project?
How can is use both in my project?
Give me some suggestion for this situation.
Thanks in advance.