Skip to content

Instantly share code, notes, and snippets.

@henning-jh
Last active June 7, 2019 20:38
Show Gist options
  • Save henning-jh/3a9a516efcbe563267f4685605e5173b to your computer and use it in GitHub Desktop.
Save henning-jh/3a9a516efcbe563267f4685605e5173b to your computer and use it in GitHub Desktop.
Sign In with Apple: check login status
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