v1.4/user-login – endpoint version is no longer supported
Closed this issue · 1 comments
solesensei commented
Hi, tried your lib, couldn't sign in to spendee
https://api.spendee.com/v1.4/user-login
Message:
{
"status": "ERROR",
"message": "The endpoint version is no longer supported.",
"version": "v1.4",
"service": "api.user-login",
"timestamp": "2020-12-02 19:37:46.736639",
"result": null
}
Checked requests on https://app-ro.spendee.com/dashboard
What i had:
- GET https://app-ro.spendee.com/firebase-config – fetch
apiKey
response = { 'config': {'apiKey': "Ba2sT...", ...}}
- POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=`{apiKey}`
payload = {"email": "email", "password": "pswd", "returnSecureToken": True} response = {"idToken": "KdDABasd..."} # fetch token
- Now you can use authorization token in authorization header for any request
headers = {"authorization": "Bearer KdDABasd.."}
Can you check my assumption above?
I can use login and password, but also i connected to Google account.
dionysio commented
Hey, so sorry, I've actually missed your comment. I did rewrite the auth a couple of months back, so if you pull from the latest version, you can log-in successfully.
Thanks for the tip about retrieving the apiKey, looking at my code, I just hardcoded the key here https://github.com/dionysio/spendee/blob/master/spendee/spendee.py#L12 - if you feel like making a PR to retrieve the key properly from the firebase config, I would appreciate it!