This repository has been archived by the owner. It is now read-only.
fix(clients): retry with a fresh token on OAuth requests #4688
Conversation
app/scripts/models/account.js
Outdated
| @@ -772,6 +772,15 @@ define(function (require, exports, module) { | |||
| */ | |||
| fetchOAuthApps () { | |||
| return this._oAuthClient.fetchOAuthApps(this.get('accessToken')) | |||
| .fail((err) => { | |||
| if (! AuthErrors.is(err, 'UNAUTHORIZED')) { | |||
| // the accessToken is very lived. | |||
shane-tomlinson
Jan 31, 2017
Member
very lived seems like it should have short or long in there.
very lived seems like it should have short or long in there.
vladikoff
Jan 31, 2017
Author
Contributor
Hahahahah I meant to remove verybut instead the word short got removed. ⏰
Hahahahah I meant to remove verybut instead the word short got removed.
app/scripts/models/account.js
Outdated
| @@ -809,6 +818,15 @@ define(function (require, exports, module) { | |||
| var accessToken = this.get('accessToken'); | |||
|
|
|||
| return this._oAuthClient.destroyOAuthApp(accessToken, oAuthAppId) | |||
| .fail((err) => { | |||
| if (! AuthErrors.is(err, 'UNAUTHORIZED')) { | |||
| // the accessToken is short lived. | |||
shane-tomlinson
Jan 31, 2017
Member
Same here too.
Same here too.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes #4659