Skip to content

Commit

Permalink
never delete refresh token when refreshing
Browse files Browse the repository at this point in the history
Otherwise this may cause any error or loss of connectivity leading to
refresh token deletion. There is a pending PR on the main repo
p2#281

Related to sensational/popscan-android#977
  • Loading branch information
balland committed Sep 14, 2018
1 parent 1e99a96 commit 2530e8f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Sources/Flows/OAuth2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ open class OAuth2: OAuth2Base {
let data = try response.responseData()
let json = try self.parseRefreshTokenResponseData(data)
if response.response.statusCode >= 400 {
self.clientConfig.refreshToken = nil
throw OAuth2Error.generic("Failed with status \(response.response.statusCode)")
}
self.logger?.debug("OAuth2", msg: "Did use refresh token for access token [\(nil != self.clientConfig.accessToken)]")
Expand Down

0 comments on commit 2530e8f

Please sign in to comment.