raspberry pi3 - 'FirebaseApplication' object has no attribute 'Authentication' -
i'm using following code fetch data firebase on raspberry pi shows following error. i'm able fetch data without authentication.
firebase.firebase import firebaseapplication firebase.firebase import firebaseauthentication firebase = firebase.firebaseapplication('https://myapp.firebaseio.com/', authentication =none) authentication = firebase.authentication('secretkey', 'prateekrai266@gmail.com', extra={'id': 123}) firebase.authentication = authentication print (authentication.extra) user = authentication.get_user() print (user.firebase_auth_token) result = firebase.get('/messages', none)
it shows following error
traceback (most recent call last):
file "/home/pi/code/dataauth.py", line 7, in authentication = firebase.authentication('secretkey', 'prateekrai266@gmail.com', extra={'id': 123}) attributeerror: 'firebaseapplication' object has no attribute 'authentication'
i'm able fetch data without authentication i.e. setting rules true, following code
from firebase.firebase import firebaseapplication firebase = firebase.firebaseapplication('https://myapp.firebaseio.com/', none) result = firebase.get('/messages', none)
Comments
Post a Comment