mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #356] How can I get callback that authorization process has been finished? #227
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#227
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 @hiragram on GitHub (Apr 4, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/356
Description:
I am using my custom webview controller, and I want to dismiss the vc when authorization has succeeded.
I have looked into implementation of
SafariURLHandlerand found it usesOAuthSwift.CallbackNotification.notificationNamebutCallbackNotificationis internal struct so I cannot use.Are there any way to receive callback like that?
OAuth Provider (Twitter, Github, ..):
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
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
@phimage commented on GitHub (Apr 4, 2017):
You can look at demo app
github.com/OAuthSwift/OAuthSwift@0296377d14/Demo/Common/WebViewController.swiftUsing the delegate of web view you could know when your url is open and so you can dismiss immediately or launch a task using DispatchQueue
@hiragram commented on GitHub (Apr 4, 2017):
@phimage
Thanks for quick reply.
I understand your suggestion. But my webview controller is used in whole app so I don't want to write OAuth-specific code in the webview controller class. If I could receive notification in my custom
OAuthSwiftURLHandlerTypesuch asSafariURLHandler, that sounds more better to me.How do you think about making
CallbackNotificationtype public?@phimage commented on GitHub (Apr 4, 2017):
why not, but the code is not clean
For instance I think instead of
we must have
If you do the PR I will merge
@hiragram commented on GitHub (Apr 4, 2017):
@phimage
Sounds cool. I will do that on my fork and create PR.