I have issue. I have AppleLogin button with following action (see below). The logic what I did are:
- When user signing in for first time, its save his user object and uses it on next login try.
But I am getting fail, when I remove my app from device and trying install it again, on Apple login I am getting empty user credentials. It fixes only If I remove app from apps that using AppleID from device Settings. How I can handle this?
@available(iOS 13.0, *)
@objc func handleLogInWithAppleID() {
let request = ASAuthorizationAppleIDProvider().createRequest()
request.requestedScopes = [.fullName, .email]
let controller = ASAuthorizationController(authorizationRequests: [request])
controller.delegate = self
controller.presentationContextProvider = self
controller.performRequests()
}
Found issue by myself, I was saving credentials to RealmDB, not to Keychain :(
P.S hope this post helps to someone