Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to refresh JWT auth token #197

Closed
GabeLambda opened this issue Mar 28, 2017 · 4 comments
Closed

Unable to refresh JWT auth token #197

GabeLambda opened this issue Mar 28, 2017 · 4 comments

Comments

@GabeLambda
Copy link

GabeLambda commented Mar 28, 2017

https://github.com/box/box-python-sdk/blob/master/boxsdk/auth/jwt_auth.py#L195

Callers of this method are expecting a tuple of (access_token, refresh_token), not just access_token. This breaks downstream in https://github.com/box/box-python-sdk/blob/master/boxsdk/session/box_session.py#L196, causing clients which use JWTAuth to break on refresh.

Example:

File "/usr/local/lib/python3.4/dist-packages/boxsdk/session/box_session.py", line 196, in _renew_session
    new_access_token, _ = self._oauth.refresh(access_token_used)

ValueError: too many values to unpack (expected 2)

Version: 2.0.0a4

GabeLambda added a commit to GabeLambda/box-python-sdk that referenced this issue Mar 28, 2017
@maxdebayser
Copy link

This fix worked for me

@cschloer
Copy link

cschloer commented Jul 19, 2017

Fixed also worked for me but would rather not use a fork forever. Any status on this getting into master?

@jmoldow
Copy link
Contributor

jmoldow commented Jul 26, 2017

Fixed via #209

@jmoldow jmoldow closed this as completed Jul 26, 2017
jmoldow added a commit that referenced this issue Jul 26, 2017
Fixes #197 in v1.5.

Cherry picked from master branch (v2.0.0).

(cherry picked from commit e5149f6)
jmoldow added a commit that referenced this issue Jul 27, 2017
Fix JWT Token Refresh and bump version to 1.5.4

Fixes #197 in v1.5.

Pull in repo config changes from master branch.

Add testing support for Python 3.6, and upgrade PyPy tests to
use PyPy2.7 5.8.0.

Lock sphinx to a version that still supports Python 2.6. (In the
future, on the master branch, we should exclude the sphinx
install from CI jobs that don't use it, and use Python 3.6 for
the job that does require sphinx.)

Add new pattern to .gitignore, update configs in .pylintrc, add
isort config.

Add versioning note to README.

Cherry pick Python3.6 support from master branch.

Bump version to 1.5.4
@jmoldow
Copy link
Contributor

jmoldow commented Jul 27, 2017

Also fixed in 1.5 via #217.

I just released a new version, 1.5.4, with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants