Skip to content

Commit

Permalink
Merge branch 'pr/FixSsoLoginWrapper' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sagishm committed Aug 15, 2023
2 parents fa01ac7 + 3e2726d commit d2f46c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GigyaSwift/Global/Providers/WebLogin/SsoLoginWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class ASWebAuthenticationLayer: NSObject, ASWebAuthenticationPresentationContext
}

func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
return UIApplication.shared.windows.first!
return UIApplication.shared.windows.first { window in
return window.isKeyWindow
} ?? UIApplication.shared.windows.first!
}
}

0 comments on commit d2f46c0

Please sign in to comment.