[GH-ISSUE #581] Flickr - redirect to webview, If i deny authorizing in the conformation page. #380

Closed
opened 2026-03-03 16:48:13 +03:00 by kerem · 1 comment
Owner

Originally created by @Mohamed-Raffi on GitHub (Mar 28, 2020).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/581

Description:

Team,

My application redirect to Flickr webview, if i tap NO THANKS in the authorizing conformation page. I haven't get any callback when i tap NO THANKS button.

i'm using OAuth1Swift.

  func doOAuthFlickr(completion: @escaping (Bool) -> ()){
       let oauthswift = OAuth1Swift(
           consumerKey:    ConsumerKeys.consumerKey,
           consumerSecret: ConsumerKeys.consumerSecret,
           requestTokenUrl: "https://www.flickr.com/services/oauth/request_token",
           authorizeUrl:    "https://www.flickr.com/services/oauth/authorize",
           accessTokenUrl:  "https://www.flickr.com/services/oauth/access_token"
       )
       oauthswift.authorizeURLHandler = getURLHandler()
       let _ = oauthswift.authorize(
       withCallbackURL: URL(string: "oauth-swift://oauth-callback/flickr")!) { result in
           switch result {
           case .success(let (credential, _, parameters)):
               let userId = parameters["user_nsid"] as! String
               let u_id = userId.removingPercentEncoding ?? ""
               print(u_id)
               completion(true)
           case .failure(let error):
               print(error.description)
           }
       }
   }

Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-28 at 11 25 59
Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-28 at 11 26 05

OAuth Provider? (Twitter, Github, ..):

Flickr

OAuth Version:

  • [ 2.1.0] Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • [x ] CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • v1.2 (Swift 4.0)
  • other: (Please fill in the version you are using.)

Xcode version:

  • [ x] 11.x (Swift 5.1)

  • 10.x (Swift 5.0)

  • 10.x (Swift 4.1)

  • 9.3 (Swift 4.1)

  • 9.0 (Swift 4.0)

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

  • objective c

Originally created by @Mohamed-Raffi on GitHub (Mar 28, 2020). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/581 ### Description: Team, My application redirect to Flickr webview, if i tap **NO THANKS** in the authorizing conformation page. I haven't get any callback when i tap **NO THANKS** button. i'm using OAuth1Swift. ``` func doOAuthFlickr(completion: @escaping (Bool) -> ()){ let oauthswift = OAuth1Swift( consumerKey: ConsumerKeys.consumerKey, consumerSecret: ConsumerKeys.consumerSecret, requestTokenUrl: "https://www.flickr.com/services/oauth/request_token", authorizeUrl: "https://www.flickr.com/services/oauth/authorize", accessTokenUrl: "https://www.flickr.com/services/oauth/access_token" ) oauthswift.authorizeURLHandler = getURLHandler() let _ = oauthswift.authorize( withCallbackURL: URL(string: "oauth-swift://oauth-callback/flickr")!) { result in switch result { case .success(let (credential, _, parameters)): let userId = parameters["user_nsid"] as! String let u_id = userId.removingPercentEncoding ?? "" print(u_id) completion(true) case .failure(let error): print(error.description) } } } ``` ![Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-28 at 11 25 59](https://user-images.githubusercontent.com/12294429/77816677-8e489100-70ea-11ea-80df-66ba4d01ad40.png) ![Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-28 at 11 26 05](https://user-images.githubusercontent.com/12294429/77816682-930d4500-70ea-11ea-9f0e-a38daa84deab.png) ### OAuth Provider? (Twitter, Github, ..): Flickr ### OAuth Version: - [ 2.1.0] Version 1 - [ ] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x ] CocoaPods - [ ] Swift Package Manager - [ ] Manually ### Library version: - [ ] head - [ ] v2.1.0 - [ ] v2.0.0 - [ ] v1.4.1 - [ ] v1.2 (Swift 4.0) - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [ x] 11.x (Swift 5.1) - [ ] 10.x (Swift 5.0) - [ ] 10.x (Swift 4.1) - [ ] 9.3 (Swift 4.1) - [ ] 9.0 (Swift 4.0) - [ ] other: (Please fill in the version you are using.) - [ ] objective c
kerem closed this issue 2026-03-03 16:48:13 +03:00
Author
Owner

@phimage commented on GitHub (May 2, 2020):

the important part here is the url handler used, I see code from demo , not the handler used
I close the issue but you could open new one with more information

<!-- gh-comment-id:623005808 --> @phimage commented on GitHub (May 2, 2020): the important part here is the url handler used, I see code from demo , not the handler used I close the issue but you could open new one with more information
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#380
No description provided.