Skip to content

Commit 6adc805

Browse files
authored
Store an updated refresh token to keychain (p2#363)
Closes p2#362
1 parent 4be73d3 commit 6adc805

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Flows/OAuth2.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ open class OAuth2: OAuth2Base {
378378
throw OAuth2Error.generic("Failed with status \(response.response.statusCode)")
379379
}
380380
self.logger?.debug("OAuth2", msg: "Did use refresh token for access token [\(nil != self.clientConfig.accessToken)]")
381+
if (self.useKeychain) {
382+
self.storeTokensToKeychain()
383+
}
381384
callback(json, nil)
382385
}
383386
catch let error {

0 commit comments

Comments
 (0)