[GH-ISSUE #537] cannot detect dismiss when using SafariURLHandler #354

Closed
opened 2026-03-03 16:47:59 +03:00 by kerem · 2 comments
Owner

Originally created by @garyhooper on GitHub (Jul 26, 2019).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/537

Description:

I am using SafariURLHandler as my handler. The handler's presentCompletion() is correctly detected and invoked when the Safari page is displayed.

However, if the user presses Done without entering credentials, dismissCompletion() is not being called. How can I detect that Done was pressed?

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

  • TripIt

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

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

Xcode version:

  • 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 @garyhooper on GitHub (Jul 26, 2019). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/537 ### Description: I am using SafariURLHandler as my handler. The handler's presentCompletion() is correctly detected and invoked when the Safari page is displayed. However, if the user presses Done without entering credentials, dismissCompletion() is not being called. How can I detect that Done was pressed? ### OAuth Provider? (Twitter, Github, ..): - TripIt ### OAuth Version: - [X] 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.0.0 - [ ] v1.4.1 - [ ] v1.2.1 - [X] v1.2 (Swift 4.0) - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [ ] 11.x (Swift 5.1) - [X] 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:47:59 +03:00
Author
Owner

@phimage commented on GitHub (Jul 26, 2019):

in SafariURLHandler you can add a delegate of type SFSafariViewControllerDelegate
github.com/OAuthSwift/OAuthSwift@ec656d9ab1/Sources/OAuthSwiftURLHandlerType.swift (L126)

<!-- gh-comment-id:515380742 --> @phimage commented on GitHub (Jul 26, 2019): in `SafariURLHandler` you can add a delegate of type `SFSafariViewControllerDelegate ` https://github.com/OAuthSwift/OAuthSwift/blob/ec656d9ab13193702ef4ca79c1f9a42fc2be7316/Sources/OAuthSwiftURLHandlerType.swift#L126
Author
Owner

@garyhooper commented on GitHub (Jul 26, 2019):

Thank you!

<!-- gh-comment-id:515513565 --> @garyhooper commented on GitHub (Jul 26, 2019): Thank you!
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#354
No description provided.