1

I want to get the UID of the current logged in account on firebase using python. I know how do to this using javascript The code is

user = FirebaseAuth.getInstance().getCurrentUser()
uid = user.getUid() 

but i'm trying to do it using the python-firebase module or the firebase.admin module. Any help would be appreciated.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
RustyRyan
  • 29
  • 4

1 Answers1

0

When you you the Firebase Admin SDK on any platform, there is no sense of current logged in user. The Admin SDK gives you privileged access to Firebase and Cloud products using a service account for authentication and authorization. It doesn't use a Firebase Authentication account.

Only the mobile and web clients have a sense of currently logged in user, because they require the user to authenticate in order to gain acccess.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • So it’s it possible that I can check the uid of a logged in user using the python-firebase module ? – RustyRyan Nov 26 '19 at 17:56
  • I'm not sure what you're asking. You can use the Firebase Admin SDK to perform a bunch of tasks with regard to authenticated users. Take a look at the documentation to see what you can do. https://firebase.google.com/docs/auth/admin/manage-users – Doug Stevenson Nov 26 '19 at 17:58