How do I return a list of users if I use the Firebase simple username & password authentication

后端 未结 7 2086
猫巷女王i
猫巷女王i 2020-11-22 05:06

Not sure if I am doing something wrong but using this api https://www.firebase.com/docs/security/simple-login-email-password.html I can successfully create a user - accordin

7条回答
  •  死守一世寂寞
    2020-11-22 05:29

    Users list in python:

    from firebase_admin import credentials, db, auth
    cred = credentials.Certificate('\path\to\serviceAccountKey.json')
    default_app = firebase_admin.initialize_app(cred, {
        "databaseURL": "https://data_base_url.firebaseio.com"
    })
    users = auth.list_users()
    

提交回复
热议问题