Currently, when the Google access token in use expires, the KIO slave silently ignores refreshing the token (only 'not implemented' gets logged) and fails all subsequent api requests. This patch prevents the slave from breaking by requesting new credentials from KAccounts.
Details
Open a Google Drive folder in Dolphin, wait until accounts token needs a refresh, open another Google Drive folder. The folder loads because a new access token was requested.
Diff Detail
- Repository
- R219 KIO GDrive
- Branch
- arcpatch-D22009
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13664 Build 13682: arc lint + arc unit
@elvisangelaccio We have a refresh token available that could be used but I couldn't find any information regarding refreshing an account through KAccounts. Do you know if such functionality is available? If not, would you perhaps know who I can reach out to?
I don't know, sorry.
You can try to ask @mck182 (original KAccounts author), but you probably want to ask the signon developers first: https://accounts-sso.gitlab.io/
src/kaccountsmanager.cpp | ||
---|---|---|
88–100 | const | |
src/kaccountsmanager.h | ||
43 | const QString& |
Looking at accounts-sso/signon-plugin-oauth2, it seems they switch to refreshing if a previous token request returned a refresh_token in the response (which should be our case).