Last active
June 7, 2019 20:38
-
-
Save henning-jh/3a9a516efcbe563267f4685605e5173b to your computer and use it in GitHub Desktop.
Sign In with Apple: check login status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let userIdentifier = // get saved userIdentifier - sample app uses Keychain | |
appleIDProvider.getCredentialState(forUserID: userIdentifier) { (credentialState, error) in | |
switch credentialState { | |
case .authorized: | |
// The Apple ID credential is valid. | |
break | |
case .revoked: | |
// The Apple ID credential is revoked. | |
break | |
case .notFound: | |
// No credential was found, so show the sign-in UI. | |
// code .... | |
default: | |
break | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment