Skip to content

Commit 2530e8f

Browse files
committed
never delete refresh token when refreshing
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
1 parent 1e99a96 commit 2530e8f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Sources/Flows/OAuth2.swift

-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,6 @@ open class OAuth2: OAuth2Base {
367367
let data = try response.responseData()
368368
let json = try self.parseRefreshTokenResponseData(data)
369369
if response.response.statusCode >= 400 {
370-
self.clientConfig.refreshToken = nil
371370
throw OAuth2Error.generic("Failed with status \(response.response.statusCode)")
372371
}
373372
self.logger?.debug("OAuth2", msg: "Did use refresh token for access token [\(nil != self.clientConfig.accessToken)]")

0 commit comments

Comments
 (0)