xamarin / GooglePlayServicesComponents

Other
315 stars 146 forks source link

SignInWithEmailLink is returning zzr object instead of AuthResult #759

Closed jpacov closed 6 months ago

jpacov commented 1 year ago

Xamarin.Android Version (eg: 6.0):

13.1.0.1

Operating System & Version (eg: Mac OSX 10.11):

Windows 10

Google Play Services Version

Describe your Issue

When calling FirebaseAuth.Instance.SignInWithEmailLink(email, emaillink), the success task result is a zzr object instead of an AuthResult object according to Firebase documentation.

Relevant information

Packages used:

    <PackageReference Include="Xamarin.Firebase.Auth" Version="121.1.0.1" />

Minimal Repro Code Sample

FirebaseAuth.Instance.SignInWithEmailLink(email, emaillink) OnComplete listener returns object of type com.google.firebase.auth.internal.zzr

Steps to Reproduce (with link to sample solution if possible):

Include any relevant Exception Stack traces, build logs, adb logs:

moljac commented 6 months ago

version [1]22.3.0.1 seems to be OK.

        // Metadata.xml XPath method reference: path="/api/package[@name='com.google.firebase.auth']/class[@name='FirebaseAuth']/method[@name='signInWithEmailLink' and count(parameter)=2 and parameter[1][@type='java.lang.String'] and parameter[2][@type='java.lang.String']]"
        [Register ("signInWithEmailLink", "(Ljava/lang/String;Ljava/lang/String;)Lcom/google/android/gms/tasks/Task;", "GetSignInWithEmailLink_Ljava_lang_String_Ljava_lang_String_Handler")]
        public virtual unsafe global::Android.Gms.Tasks.Task SignInWithEmailLink (string email, string link)
        {
            const string __id = "signInWithEmailLink.(Ljava/lang/String;Ljava/lang/String;)Lcom/google/android/gms/tasks/Task;";
            IntPtr native_email = JNIEnv.NewString ((string)email);
            IntPtr native_link = JNIEnv.NewString ((string)link);
            try {
                JniArgumentValue* __args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue (native_email);
                __args [1] = new JniArgumentValue (native_link);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod (__id, this, __args);
                return global::Java.Lang.Object.GetObject<global::Android.Gms.Tasks.Task> (__rm.Handle, JniHandleOwnership.TransferLocalRef);
            } finally {
                JNIEnv.DeleteLocalRef (native_email);
                JNIEnv.DeleteLocalRef (native_link);
            }
        }
      <method abstract="false" deprecated="not deprecated" final="false" name="signInWithEmailLink" jni-signature="(Ljava/lang/String;Ljava/lang/String;)Lcom/google/android/gms/tasks/Task;" bridge="false" native="false" return="com.google.android.gms.tasks.Task&lt;com.google.firebase.auth.AuthResult&gt;" jni-return="Lcom/google/android/gms/tasks/Task&lt;Lcom/google/firebase/auth/AuthResult;&gt;;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true">
        <parameter name="email" type="java.lang.String" jni-type="Ljava/lang/String;" not-null="true" />
        <parameter name="link" type="java.lang.String" jni-type="Ljava/lang/String;" not-null="true" />
      </method>
moljac commented 6 months ago

closing this issue.

If the issue persists please open new issue