mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Display apple sign in error message
This commit is contained in:
parent
bb1b425217
commit
f557e0e606
@ -801,6 +801,14 @@ public final class AuthorizationSequenceController: NavigationController, ASAuth
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
|
||||
guard let lastController = self.viewControllers.last as? ViewController else {
|
||||
return
|
||||
}
|
||||
lastController.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: self.presentationData), title: nil, text: error.localizedDescription, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
|
||||
return self.view.window!
|
||||
|
@ -654,6 +654,11 @@ class PrivacyAndSecurityControllerImpl: ItemListController, ASAuthorizationContr
|
||||
self.authorizationCompletion?(authorization.credential)
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
|
||||
Logger.shared.log("AppleSignIn", "Failed with error: \(error.localizedDescription)")
|
||||
}
|
||||
|
||||
@available(iOS 13.0, *)
|
||||
public func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
|
||||
return self.view.window!
|
||||
|
Loading…
x
Reference in New Issue
Block a user