google_api_get()
function does not refresh headers and does same request twice with 401 error.
#84
Labels
google_api_get()
function does not refresh headers and does same request twice with 401 error.
#84
Hi there,
I'm trying to use django-mailbox library on one of my projects together with python-social-auth. The problem I found related to
google_api_get()
function here:https://github.com/coddingtonbear/django-mailbox/blob/master/django_mailbox/google_utils.py#L53
Your first request on the line 57 in case of expired token will return 401 status code. So after this, you trying to refresh access token and store it in the database by calling
refresh_authorization()
function on line 61.But after token refreshed and stored back to database you doing the same GET request on line 62. You still using old headers with old access token. This request also return 401 status code and there's None returned from this function.
Looks like you missed to update headers before doing this second GET request?
The text was updated successfully, but these errors were encountered: