mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #626] How can I use SafariURLHandler in SwiftUI App Lifecycle? #408
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#408
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 @kkebo on GitHub (Oct 6, 2020).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/626
Description:
The README.md describes how to use the
SFSafariViewController. However, how can I use it in SwiftUI App Lifecycle like the below?OAuth Provider? (Twitter, Github, ..):
Any
OAuth Version:
OS (Please fill the version) :
Xcode version:
@phimage commented on GitHub (Oct 6, 2020):
not without some adaptation
you must look at SFSafariViewController and swiftui
I never tested it but I think you must implement UIViewControllerRepresentable and provide the controller used with
makeUIViewController(maybe SafariURLHandler could implement it or add another object to encapsulate (do not hesitate to share if you have a solution and to close this issue)
@kkebo commented on GitHub (Oct 6, 2020):
Thanks you @phimage.
SafariURLHandler(present:,dismiss:,oauthSwift:)may be what I was looking for. If it works, I'll share it and close this issue.@kkebo commented on GitHub (Nov 10, 2020):
BTW, I gave up using OAuthSwift with SwiftUI's App Lifecycle.
@kkebo commented on GitHub (Nov 20, 2020):
I succeeded in using OAuthSwift with SwiftUI App Lifecycle. I gave up using
SafariURLHandler, butASWebAuthenticationURLHandlerandASWebAuthenticationSessionURLHandlerof #621 can be used with SwiftUI App Lifecyle.Here is an example.