Pascal Pfiffner

Results 97 comments of Pascal Pfiffner
trafficstars

It's not well documented but you can use [`OAuth2DebugURLSessionDelegate`](https://p2.github.io/OAuth2/Classes/OAuth2DebugURLSessionDelegate.html) for this: ``` swift self.oauth = OAuth2...(settings: [:]) oauth.sessionDelegate = OAuth2DebugURLSessionDelegate(host: "domain.com") oauth.authorize() { params, error in // ... } ```

`params` is expected to be nil when authorization doesn't succeed – it would contain authorization parameters. Can you try to debug, set a breakpoint in [OAuth2DebugURLSessionDelegate#42](https://github.com/p2/OAuth2/blob/master/Sources/Base/OAuth2DebugURLSessionDelegate.swift#L43)? Which version are you...

Set a break point at [OAuth2Base.swift#220](https://github.com/p2/OAuth2/blob/swift-2.3/Sources/Base/OAuth2Base.swift#L220) to check whether the session is correctly initiated.

When you step through, does it create a new session (line 222) and does it use your `sessionDelegate` on that same line?

I just tried with the 2.3 version, the breakpoint should be set in [OAuth2Request.swift#71](https://github.com/p2/OAuth2/blob/swift-2.3/Sources/Base/OAuth2Request.swift#L71). It breaks for me, so this should work. I'm not sure if the IP-based thing works,...

Are the breakpoints mentioned above being called?

Which version of the OAuth2 framework are you using, and how (Pod, Carthage, source)?

@aliasdoc Were you able to resolve this issue? If not, do you have a public-facing server with the self-signed certificate so I can test with?