File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,17 +27,15 @@ final class AppleSignInWebService: ServiceAuthentication {
2727
2828 @available ( iOS 13 . 0 , * )
2929 func authorizationController( controller: ASAuthorizationController , didCompleteWithAuthorization authorization: ASAuthorization ) {
30- switch authorization . credential {
31- case let appleIDCredential as ASAuthorizationAppleIDCredential :
32- guard let identityTokenData = appleIDCredential. identityToken,
33- let identitityCodeString = String ( data: identityTokenData, encoding: . utf8) else {
30+ guard
31+ let appleIDCredential = authorization . credential as? ASAuthorizationAppleIDCredential ,
32+ let identityTokenData = appleIDCredential. identityToken,
33+ let identitityCodeString = String ( data: identityTokenData, encoding: . utf8) else {
3434 completion ( . failure( . invalidResponse) )
3535 return
36- }
37- completion ( . success( identitityCodeString) )
38- default :
39- completion ( . failure( . invalidResponse) )
4036 }
37+
38+ completion ( . success( identitityCodeString) )
4139 }
4240
4341 @available ( iOS 13 . 0 , * )
You can’t perform that action at this time.
0 commit comments