[GH-ISSUE #334] Setting allowMissingOAuthVerifier fails OAuth1 requests #208

Closed
opened 2026-03-03 16:46:42 +03:00 by kerem · 1 comment
Owner

Originally created by @galiak11 on GitHub (Feb 8, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/334

Description:

oauth_verifier is not always ignored when allowMissingOAuthVerifier is set to true, causing oauth1 access_token requests to fail.

OAuth Provider (Twitter, Github, ..):

Any Oauth Provider that doesn't use a verifier. Example: Bynder.com.

OAuth Version:

  • Oauth1

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • [x ] CocoaPods
  • [x ] Manually

Library version:

  • head
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)

Xcode version:

  • 8.0 (Swift 3.0)

  • 8.0 (Swift 2.3)

  • 7.3.1

  • other: (Please fill in the version you are using.)

  • objective c

Suggested fix

The assignment to: parameters["oauth_verifier"] in the method: OAuth1Swift.postOAuthAccessTokenWithRequestToken(success:failure:) must be wrapped in a condition:

if !self.allowMissingOAuthVerifier {
   parameters["oauth_verifier"] = self.client.credential.oauthVerifier
}
Originally created by @galiak11 on GitHub (Feb 8, 2017). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/334 ### Description: `oauth_verifier` is not always ignored when `allowMissingOAuthVerifier` is set to true, causing oauth1 `access_token` requests to fail. ### OAuth Provider (Twitter, Github, ..): Any Oauth Provider that doesn't use a verifier. Example: Bynder.com. ### OAuth Version: - [ ] Oauth1 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x ] CocoaPods - [x ] Manually ### Library version: - [ ] head - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x] 8.0 (Swift 3.0) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [ ] other: (Please fill in the version you are using.) - [ ] objective c ### Suggested fix The assignment to: `parameters["oauth_verifier"]` in the method: `OAuth1Swift.postOAuthAccessTokenWithRequestToken(success:failure:)` must be wrapped in a condition: ``` if !self.allowMissingOAuthVerifier { parameters["oauth_verifier"] = self.client.credential.oauthVerifier } ```
kerem 2026-03-03 16:46:42 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@phimage commented on GitHub (Feb 8, 2017):

I am ok with the suggested fix
event if your oauth provider(bynder) is a little too strict, it do not allow to add additional query parameters

I will commit but next time do not hesitate to create a pull request

thanks

<!-- gh-comment-id:278294345 --> @phimage commented on GitHub (Feb 8, 2017): I am ok with the suggested fix event if your oauth provider(bynder) is a little too strict, it do not allow to add additional query parameters I will commit but next time do not hesitate to create a pull request thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#208
No description provided.