diff --git a/Tusker/Screens/Onboarding/OnboardingViewController.swift b/Tusker/Screens/Onboarding/OnboardingViewController.swift index ebfefdd8..7a1e0c1f 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!! + } +}