Allow accessTokenBasicAuthentification option with OAuth2
Description:
Is there a reason why we cannot use the accessTokenBasicAuthentification option when calling the renewAccessToken function from the OAuth2Swift class?
If we previously set the option when retrieving a token for the first time, it seems logical to reuse the option when refreshing the token.
OAuth Provider? (Twitter, Github, ..):
Custom
OAuth Version:
- [x] Version 2
OS (Please fill the version) :
- [x] iOS : 14.6
Installation method:
- [x] CocoaPods
Library version:
- [x] v2.2.0
Xcode version:
- [x] latest
In case it helps, I have solved this issue by modifying OAuth2Swift.swift renewAccessToken() so that it passes self.accessTokenBasicAuthentification. So now that looks like: return self.client.renewAccessToken(accessTokenUrl: self.accessTokenUrl, withRefreshToken: refreshToken, parameters: parameters ?? OAuthSwift.Parameters(), headers: headers, accessTokenBasicAuthentification: self.accessTokenBasicAuthentification, completionHandler: completion)
While I dislike modifying framework code, I have to do it for OauthSwift anyway in order to get it to work correctly on MacCatalyst (issue #634).