Skip to content

Commit

Permalink
address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzNotABug committed Dec 11, 2024
1 parent 7667db2 commit 47bcebd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions templates/swift/Sources/OAuth/WebAuthComponent.swift.twig
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,8 @@ class PresentationContextProvider: NSObject, ASWebAuthenticationPresentationCont
static let shared = PresentationContextProvider()

func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
if let mainWindow = windowScene.windows.first {
return mainWindow
}
if let mainWindow = OSApplication.shared.windows.first { $0.isKeyWindow } {
return mainWindow
}

return ASPresentationAnchor()
Expand Down

0 comments on commit 47bcebd

Please sign in to comment.