OAuth2 Tokens from providers that don't provide an expiry date are incorrectly expired on first use
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Online Accounts: OAuth2 plug-in |
In Progress
|
Medium
|
|||
signon-plugin-oauth2 (Ubuntu) |
Fix Released
|
Undecided
|
Alberto Mardegan |
Bug Description
I've been trying to use the Online Accounts system to manage log in to the SoundCloud web site, and hit a problem: I can sign in without problem through the control panel, but when I try to retrieve the token via libsignon-glib, I get an error and the account is marked as signed out.
Looking at the syslog chatter from signond, it apparently decides that the token has expired:
May 5 14:11:50 scruffy signonpluginpro
This was a bit surprising, since SoundCloud says their tokens are not set to expire. Looking furtherback to where the token was stored, I see:
May 5 14:10:03 scruffy signonpluginpro
In particular, Expiry==0. This seems to be the code where the expiry is set, where it reads the "expires_in" property from the response JSON:
However, looking at the SoundCloud HTTP API reference, it isn't sending this in their JSON response:
http://
It looks like this method needs to check whether expires_in is actually included in the JSON response.
Related branches
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
- David Barth (community): Approve
-
Diff: 783 lines (+562/-44)8 files modifiedcommon-vars.pri (+1/-1)
debian/changelog (+8/-0)
debian/control (+2/-1)
src/oauth2data.h (+7/-0)
src/oauth2plugin.cpp (+22/-16)
src/oauth2plugin.h (+1/-1)
tests/oauth2plugintest.cpp (+515/-25)
tests/oauth2plugintest.h (+6/-0)
Changed in signon-plugin-oauth2: | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in signon-plugin-oauth2 (Ubuntu): | |
assignee: | nobody → Alberto Mardegan (mardy) |
Status changed to 'Confirmed' because the bug affects multiple users.