mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #235] Is there any way to do logout with SFSafariViewController? #133
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#133
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 @dasoga on GitHub (Jun 14, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/235
I'm trying to do logout user from my server.
With url like: "http://auth.mydomain.com/logout
I'm using Safari View controller
Somebody knows how can I do logout through OAuthSwift?.
Thanks!
@phimage commented on GitHub (Jun 16, 2016):
According to the docs: SFSafariViewController shares cookies and other website data with Safari and because it runs outside your app's process (for security reasons) I think you cannot modify it's state from inside your app
(Without SFSafariViewController ie. webkit view we remove the cookies)
Maybe we could present the SFSafariViewController with logout page for the specific provider, for instance http://github.com/logout or your url
Just open it SFSafariViewController (url: ...) and let user logout
@dasoga commented on GitHub (Jun 16, 2016):
My problem is when I open SFSafariViewController with my url "http://auth.mydomain.com/logout" whit this code:
I'm clearing all cache and in completion I'm going to my login view controller, but SFSafariViewController is still in the stack of view controller.
Someone who knows if is another way to do this?
Really thanks!
@dasoga commented on GitHub (Jun 16, 2016):
@phimage actually that's works good, but the SFSafariViewController is still in the stack of view controllers.
@phimage commented on GitHub (Jun 16, 2016):
you have an error message which specify that? (view already in stack..) ie. the controller is not well dismissed
@dasoga commented on GitHub (Jun 16, 2016):
@phimage sorry, yes that is the problem, the SFSafariViewController is not well dismissed.
@phimage commented on GitHub (Jul 7, 2016):
@dasoga If you have an error message please post it (google search with this message could help me to understand)
In the past I have some issue with controller not well dismissed, dispatch queue problem. So I use a library like https://github.com/kodlian/Eki to dispatch some code into main (or background) queue
@phimage commented on GitHub (Aug 8, 2016):
https://github.com/OAuthSwift/OAuthSwift/wiki/Logout
makeRequestto enable populating existing URLRequest and add testing target #528