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

Carrying over refresh token #569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jacobb84
Copy link

This builds upon the work done in PR 381. That ticket is on hold because it was perceived to be a Google specific issue, but I think the issue is broader then that. I noticed the same issue on SalesForce and Issue #26 reports the same issue for Facebook. I took a look at the oAuth specification and I think I see where the disconnect is. Take a look at the diagram in this section on authorization flow: https://tools.ietf.org/html/rfc6749#section-1.5

G and H in the diagram document the refresh-token flow and according to H the server may optionally return a new refresh token as part of that request. For environments that don't expire the refresh token, it is never returned. I think since the RFC for it says it's optional we should account for it at the abstract service layer.

This takes the approach in PR 381 but with an added check to be sure the refresh token is absent before it carries it over, to ensure it doesn't break flows that do decide to return a new refresh token.

@jacobb84
Copy link
Author

The test failure seems unrelated to this change.

@tezrik
Copy link
Collaborator

tezrik commented Oct 9, 2020

Please add tests for your functionality

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

Successfully merging this pull request may close these issues.

2 participants