static async Task HandleCallbackUri(Uri callbackUri) { await ViewControllerServices.CloseSFSafariViewController().ConfigureAwait(false); var gitHubAuthenticationService = ContainerService.Container.Resolve <GitHubAuthenticationService>(); await gitHubAuthenticationService.AuthorizeSession(callbackUri, CancellationToken.None).ConfigureAwait(false); }
static async Task HandleCallbackUri(Uri callbackUri) { await ViewControllerServices.CloseSFSafariViewController().ConfigureAwait(false); using var scope = ContainerService.Container.BeginLifetimeScope(); var gitHubAuthenticationService = scope.Resolve <GitHubAuthenticationService>(); await gitHubAuthenticationService.AuthorizeSession(callbackUri).ConfigureAwait(false); }
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { var callbackUri = new Uri(url.AbsoluteString); HandleCallbackUri().SafeFireAndForget(onException: x => Debug.WriteLine(x)); return(true); async Task HandleCallbackUri() { await ViewControllerServices.CloseSFSafariViewController().ConfigureAwait(false); using var scope = ContainerService.Container.BeginLifetimeScope(); var gitHubAuthenticationService = scope.Resolve <GitHubAuthenticationService>(); await gitHubAuthenticationService.AuthorizeSession(callbackUri).ConfigureAwait(false); } }