0

i am using firebase php admin sdk. I have no problem with user registration, login, update or pulling user data. But no auth permission. It gives a permission error when adding something to the realtime database. How can I give auth authentication with php sdk?

This is how I can access the user's data. But I guess there is no authentication permission

$users = $firebase_auth->getUser($_SESSION['firebase_uid']);
print_r($users );
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
ercan
  • 3
  • 2
  • firebase-php sdk has admin access to the database. it can write read/from anywhere unless you specificly limit it. can you share your code that gives permission error? – laltin Jan 09 '22 at 11:51
  • actually i don't get an error when i do real time data operations with php. However, when I log in with php sdk, I get an access permission error when importing, writing, updating data with javascript. As far as I understand, I need to log in with the signInWithEmailAndPassword method so that I can write and read data with js. – ercan Jan 10 '22 at 09:10
  • When I log in with php sdk, token is returned to me, is it possible to have auth permission with the token returned in the js section? – ercan Jan 10 '22 at 09:14

0 Answers0