public void LoginWithAppleId( AppleAuthLoginArgs loginArgs, Action <ICredential> successCallback, Action <IAppleError> errorCallback) { #if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE var loginOptions = loginArgs.Options; var nonce = loginArgs.Nonce; var state = loginArgs.State; var requestId = CallbackHandler.AddMessageCallback( true, payload => { var response = this._payloadDeserializer.DeserializeLoginWithAppleIdResponse(payload); if (response.Error != null) { errorCallback(response.Error); } else { successCallback(response.AppleIDCredential); } }); PInvoke.AppleAuth_LoginWithAppleId(requestId, (int)loginOptions, nonce, state); #else throw new Exception("AppleAuthManager is not supported in this platform"); #endif }
public void GetCredentialState( string userId, Action <CredentialState> successCallback, Action <IAppleError> errorCallback) { #if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE var requestId = CallbackHandler.AddMessageCallback( true, payload => { var response = this._payloadDeserializer.DeserializeCredentialStateResponse(payload); if (response.Error != null) { errorCallback(response.Error); } else { successCallback(response.CredentialState); } }); PInvoke.AppleAuth_GetCredentialState(requestId, userId); #else throw new Exception("AppleAuthManager is not supported in this platform"); #endif }