PyCharm 2016.2 and Firebase User Authenticated Calls

74 views
Skip to first unread message

Marcio Valenzuela

unread,
Sep 28, 2016, 6:32:03 PM9/28/16
to Firebase Google Group
Im trying to make user authenticated calls but so far have been unable to do so because Im not able to understand the documentation for the REST API.

What I can do:
I have made a javascript authenticated call for data.  It is based on a firebase example for authentication that I cannot find the link to now.  But I downloaded a webpage that has a javascript code to initialize a config variable for the database and then signs the user in with email and pass and finally I piggy backed on that code to fetch my data.

What I can't do:
Is do the same from a python script.

What I understand about auth:
I believe I can authenticate users to make data calls using just user and password or a token generator, is this correct? 

What I have so far:
Im trying to use the email/pass authentication like so in PyCharm 2016.2 IDE

from firebase import firebase
#method A
firebase = firebase.FirebaseApplication('https://myapp.firebaseio.com')
authentication = firebase.Authentication('pwd', 'email', extra={'id': 123})
firebase.authentication = authentication
print authentication.extra

user = authentication.get_user()
print user.firebase_auth_token

result = firebase.get('/timeoff', None)
print result

but I get this error:

authentication = firebase.Authentication('pwd', 'email', extra={'id': 123})
AttributeError: 'FirebaseApplication' object has no attribute 'Authentication'


Reply all
Reply to author
Forward
0 new messages