[GH-ISSUE #324] Issue when trying to handle the callback is going to the failure callback everytime #201

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

Originally created by @Miguelme on GitHub (Dec 20, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/324

Description:

OAuth Provider (Twitter, Github, ..):

AirService

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • CocoaPods
  • 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

I'm having troubles with the function: oauthswift.authorize

It's going to the failure callback all the time and throwing the following error :
(OAuthSwiftError error -10.)

And I don't find any doc to know how to fix it or what is going wrong. Any help will be appreciated

PS: The App open url in the AppDelegate Method is the following:

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        print("In App open Url! with url.host = " + url.host!)
        print("options \(options)")
        if (url.host == "oauth2Callback") {
            print("Right host! calling handle!")
            OAuthSwift.handle(url: url)
        }
        return true
    }

Originally created by @Miguelme on GitHub (Dec 20, 2016). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/324 ### Description: ### OAuth Provider (Twitter, Github, ..): AirService ### OAuth Version: - [ ] Version 1 - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x] CocoaPods - [ ] Manually ### Library version: - [ ] head - [x] 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 I'm having troubles with the function: oauthswift.authorize It's going to the failure callback all the time and throwing the following error : (OAuthSwiftError error -10.) And I don't find any doc to know how to fix it or what is going wrong. Any help will be appreciated PS: The App open url in the AppDelegate Method is the following: ``` func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { print("In App open Url! with url.host = " + url.host!) print("options \(options)") if (url.host == "oauth2Callback") { print("Right host! calling handle!") OAuthSwift.handle(url: url) } return true } ```
kerem 2026-03-03 16:46:37 +03:00
Author
Owner

@phimage commented on GitHub (Dec 21, 2016):

https://github.com/OAuthSwift/OAuthSwift/blob/master/Sources/OAuthSwiftError.swift

10 - retain error

you do not retain oauthSwift object

<!-- gh-comment-id:268451040 --> @phimage commented on GitHub (Dec 21, 2016): https://github.com/OAuthSwift/OAuthSwift/blob/master/Sources/OAuthSwiftError.swift 10 - retain error you do not retain oauthSwift object
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#201
No description provided.