onedrive refresh token failed

Bug #1492301 reported by laurentl
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Hello,

I retrieved an "access_token" and a "refresh_token" by following the process found here:

https://dev.onedrive.com/auth/msa_oauth.htm#code-flow

It works well, i successfully connect and upload content to my onedrive account, but after one hour (token lifetime) i lost the connection and i must request another token manually, it seems duplicity cant handle the refresh token process.

Is it normal or i miss something ?

I use duplicity 7.0.4 on Ubuntu server 14.04.

Regards.

Revision history for this message
Aleksandr Kretov (askretov) wrote :

If you're still interesting in this question, so you can add further code to duplicity/backends/onedrivebackend.py right after self.http_client = OAuth2Session(...) (for 0.7.06 it should starts on line 125) :

        # We have to refresh token manually because it's not working "under the covers"
        if token is not None:
         self.http_client.refresh_token(self.OAUTH_TOKEN_URI)

There are some problems with requests-oauthlib. It doesn't refresh token... it needs more deeper analysis. But we can just refresh it manually at this moment.

duplicity-team, maybe it worth to be commited ?

Changed in duplicity:
assignee: nobody → Kenneth Loafman (kenneth-loafman)
importance: Undecided → Medium
milestone: none → 0.7.07
status: New → In Progress
Changed in duplicity:
assignee: Kenneth Loafman (kenneth-loafman) → nobody
status: In Progress → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.