-
Notifications
You must be signed in to change notification settings - Fork 171
Specified cast is not valid Exception on Reauthenticate #419
Description
Currently Using Xamarin.Auth 6.5.1.
We have functionality of delete account.
So before performing to delete account user have to verify the phonenumber as we have used phone auth.
When we are trying to verify number with Reauthenticate, its throwing Invalid Cast Exception.
Here is some code snippet
Auth.DefaultInstance.CurrentUser.Reauthenticate(credential, (error) =>
{
if (error == null)
{
///
}
});
Here credential is created by this.
PhoneAuthCredential credential = PhoneAuthProvider.DefaultInstance.GetCredential(authId, otpCode);
And Exception is
(wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
Runtime.ConstructNSObject[T] (System.IntPtr ptr, System.Type type, ObjCRuntime.Runtime+MissingCtorResolution missingCtorResolution)
Runtime.GetNSObject[T] (System.IntPtr ptr)
Trampolines+SDUserProfileChangeHandler.Invoke (System.IntPtr block, System.IntPtr error)
(wrapper native-to-managed) ObjCRuntime.Trampolines+SDUserProfileChangeHandler.Invoke(intptr,intptr)
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.1.31/src/Xamarin.iOS/UIKit/UIApplication.cs:86
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.1.31/src/Xamarin.iOS/UIKit/UIApplication.cs:65
Application.Main (System.String[] args) /Users/haresh-mac-mini/VisualStudioProjects/Blerb_iOS_V2/Main.cs:12
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.1.31/src/Xamarin.iOS/UIKit/UIApplication.cs:86
UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.1.31/src/Xamarin.iOS/UIKit/UIApplication.cs:65
Application.Main (System.String[] args) /Users/haresh-mac-mini/VisualStudioProjects/Blerb_iOS_V2/Main.cs:12
As per my understanding there is some confilct between SDUserProfileChangeHandler and NIDUserProfileChangeHandler, as SD having 2 param and NID having 1 param in block.
Looking for some help here.