{"action":"opened","issue":{"url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/237","repository_url":"https://api.github.com/repos/openid/AppAuth-iOS","labels_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/237/comments","events_url":"https://api.github.com/repos/openid/AppAuth-iOS/issues/237/events","html_url":"https://github.com/openid/AppAuth-iOS/issues/237","id":320817001,"number":237,"title":"Control over dismissing presented SFSafariViewController? ","user":{"login":"ztepsa","id":6736375,"avatar_url":"https://avatars2.githubusercontent.com/u/6736375?v=4","gravatar_id":"","url":"https://api.github.com/users/ztepsa","html_url":"https://github.com/ztepsa","followers_url":"https://api.github.com/users/ztepsa/followers","following_url":"https://api.github.com/users/ztepsa/following{/other_user}","gists_url":"https://api.github.com/users/ztepsa/gists{/gist_id}","starred_url":"https://api.github.com/users/ztepsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztepsa/subscriptions","organizations_url":"https://api.github.com/users/ztepsa/orgs","repos_url":"https://api.github.com/users/ztepsa/repos","events_url":"https://api.github.com/users/ztepsa/events{/privacy}","received_events_url":"https://api.github.com/users/ztepsa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-07T14:03:07Z","updated_at":"2018-05-07T14:03:07Z","closed_at":null,"author_association":"NONE","body":"Is it possible to get control over dismissing presented SFSafariViewController?\r\n\r\nWhen called `OIDAuthState.authState(byPresenting: , presenting: , callback: )` after successful login or by tapping cancel button, controller is dismissed and callback is called, I would like to do some API calls with newly fetched accessToken before dismissing the SFSafariViewController.\r\n\r\nIdeas so far:\r\n* create holder controller that will be used to present SFSafariViewController, so after login is done control goes back to holder controller and it's possible to do network call before returning control back to the user. (would like to avoid this option if possible)\r\n\r\n* create instance of `OIDExternalUserAgentIOS` and present it using `OIDAuthorizationService.present( , externalUserAgent: , callback: )`, after that is done create tokenRequest and fetch it using `OIDAuthorizationService.perform( , callback: )`, but the issue here is that once token request is done, userAgent is dismissed automatically. I could subclass `OIDExternalUserAgentIOS` and override `dismiss(animated: , completion: )`, but it's really not a nice solution.\r\n\r\nAny suggestion on how to solve this issue without implementing custom external user agent, or by wrapping SFSafariViewController some holder controller?\r\n"}}
{"actor":{"display_login":"ztepsa"}}