From 03f89c752e3c0de27943d0c88652501faf265cae Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 4 Jun 2019 13:31:12 -0400 Subject: [PATCH] Fix logging in on iOS 13 --- Tusker/Screens/Onboarding/OnboardingViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tusker/Screens/Onboarding/OnboardingViewController.swift b/Tusker/Screens/Onboarding/OnboardingViewController.swift index ebfefdd865..7a1e0c1f0c 100644 --- a/Tusker/Screens/Onboarding/OnboardingViewController.swift +++ b/Tusker/Screens/Onboarding/OnboardingViewController.swift @@ -69,6 +69,7 @@ class OnboardingViewController: UIViewController { } } } + self.authenticationSession!.presentationContextProvider = self self.authenticationSession!.start() } } @@ -81,3 +82,9 @@ class OnboardingViewController: UIViewController { } } + +extension OnboardingViewController: ASWebAuthenticationPresentationContextProviding { + func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor { + return UIApplication.shared.delegate!.window!! + } +}