Python Pyrebase身份验证当前_用户[&x27;localId]返回非类型

Python Pyrebase身份验证当前_用户[&x27;localId]返回非类型,python,firebase,firebase-authentication,pyrebase,Python,Firebase,Firebase Authentication,Pyrebase,我在用Django和firebase。由于使用pyrebase库无法直接登录Google、Facebook等,因此我使用javascript处理了这一部分 我在js中使用: firebase.auth().signInWithPopup(provider).then(function(result) 要使用谷歌登录,我使用: firebase.auth().onAuthStateChanged(firebaseUser => { if(firebaseUser){

我在用Django和firebase。由于使用pyrebase库无法直接登录Google、Facebook等,因此我使用javascript处理了这一部分

我在js中使用:

firebase.auth().signInWithPopup(provider).then(function(result) 
要使用谷歌登录,我使用:

 firebase.auth().onAuthStateChanged(firebaseUser => {
    if(firebaseUser){
        console.log('logged in');
    }else{
        console.log('not logged in');
    }
})
倾听每个州的声音。每次页面重新加载时,它都会检查用户,然后我可以使用以下工具检索该页面:

firebase.auth().currentUser;
现在我想用python从pyrebase中检索相同的用户信息

currentUser = auth.current_user['localId']
但是我得到一个:
TypeError:“NoneType”对象不可下标

我还能如何从python中找到用户信息??有听众吗

还有一种方法可以从IndexedDB的“firebaseLocalStorage”中恢复用户名信息。或者我应该如何管理每个页面的当前用户信息

提前感谢您提供的任何信息。如果您需要更多信息,请询问我:)