Skip to content

fix: prevent refreshToken from lost after resetToken #5

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

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

baoshan
Copy link

@baoshan baoshan commented Sep 29, 2021

During resetToken, response from oauth-app.js is used to replace local session (this is expected).

The response has no refreshToken and refreshTokenExpiresAt, which is also reasonable since resetToken method doesn’t know (or need to know) the refreshToken.

So this PR keeps refreshToken and refreshTokenExpiresAt when replacing session data. This means after a resetToken, auth-oauth-user-client can still perform refreshToken.

@gr2m gr2m added the bug Something isn't working as documented, or is being fixed label Sep 30, 2021
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch!

@gr2m gr2m merged commit 2f222c1 into octokit:initial-version Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented, or is being fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants