mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #421] Authorize handler not called - neither success or failure #269
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#269
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @markusstaas on GitHub (Dec 11, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/421
Description:
Hi there, I am connecting to Strava API and can authorize the app successfully, however, the success or failure handler never gets called.
App Delegate Code:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { if (url.host == "oauth-callback") { OAuthSwift.handle(url: url) } return true }VC Code below:
` func login(){
}`
OAuth Provider (Twitter, Github, ..):
Strava
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
[x ] 9.0 (Swift 4.0)
9.0 (Swift 3.2)
8.x (Swift 3.x)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@markusstaas commented on GitHub (Dec 11, 2017):
If I just launch it in Safari and return the app I get the following error message:
The operation couldn’t be completed. (OAuthSwiftError error -10.)
@phimage commented on GitHub (Dec 11, 2017):
you must retain the
oauthswiftobject in memory-10 is retain error
@markusstaas commented on GitHub (Dec 11, 2017):
Thanks! I appreciate your response! It works now if I use Safari, however, if I use oauthswift.authorizeURLHandler = SafariURLHandler(viewController: self, oauthSwift: oauthswift) it won't call the breakpoints on the handlers. Do you have any advise?
Thanks so much!
Markus
@phimage commented on GitHub (Dec 13, 2017):
Any errors?
If not you can put a breakpoint in your
func application(_ app: UIApplication, open url: URL, ...to see ifOAuthSwift.handle(url: url)called