** Branch linked: lp:~mardy/signon-plugin-oauth2/lp1316021

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to signon-plugin-oauth2 in Ubuntu.
https://bugs.launchpad.net/bugs/1316021

Title:
  OAuth2 Tokens from providers that don't provide an expiry date are
  incorrectly expired on first use

Status in “signon-plugin-oauth2” package in Ubuntu:
  Confirmed

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 signonpluginprocess[7357]:
  oauth2plugin.cpp 206 respondWithStoredToken : Stored token is expired

  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 signonpluginprocess[7263]:
  oauth2plugin.cpp 631 storeResponse : QMap(("REDACTED_CLIENTID",
  QVariant(QVariantMap, QMap(("Expiry", QVariant(int, 0) ) ( "Scopes" ,
  QVariant(QStringList, ("non-expiring") ) ) ( "Token" ,
  QVariant(QString, "REDACTED_TOKEN") ) ( "refresh_token" ,
  QVariant(QString, "") ) ( "timestamp" ,  QVariant(uint, 1399270203) )
  )  ) ) )

  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:

      http://code.google.com/p/accounts-
  sso/source/browse/src/oauth2plugin.cpp?repo=signon-plugin-oauth2#444

  However, looking at the SoundCloud HTTP API reference, it isn't
  sending this in their JSON response:

      http://developers.soundcloud.com/docs/api/reference#token

  It looks like this method needs to check whether expires_in is
  actually included in the JSON response.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/signon-plugin-oauth2/+bug/1316021/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to