title: Flutter Firebase Email Passwordless login - Link giving error
body: <p>I have a flutter app in which I'm trying to use firebase Email passwordless sign in. The sending part is working, but when I open the link I get an error:</p>
  <p><a href="https://i.stack.imgur.com/CEfCm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CEfCm.png" alt="email sign in link canHandleCodeInApp error" /></a></p>
  <p>The handleCodeInApp parameter in the actioncode settings is true however.</p>
  <pre><code>_firebaseAuth.sendSignInLinkToEmail(
    email: email.value,
    actionCodeSettings: firebase_auth.ActionCodeSettings(
      url: uri.toString(),
      iOSBundleId: &quot;myPackageName&quot;,
      androidPackageName: &quot;myPackageName&quot;,
      androidMinimumVersion: '0',
      androidInstallApp: false,
      handleCodeInApp: true,
      dynamicLinkDomain: &quot;myPackageName&quot;,
    ),
  );
  </code></pre>
  <p>The Uri gets created here:</p>
  <pre><code>DynamicLinkParameters parameters = DynamicLinkParameters(
    uriPrefix: 'https://myRegisteredDomain',
    link: Uri.parse('https://myRegisteredDomain'),
    androidParameters: AndroidParameters(
      packageName: 'myPackageName',
      minimumVersion: 0,
    ),
    iosParameters: IosParameters(
      bundleId: 'myPackageName',
      minimumVersion: '0',
    ),
  );
  return await parameters.buildUrl();
  </code></pre>
  <p>Intent filter is set up as follows:</p>
  <pre><code>&lt;intent-filter&gt;
      &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;
      &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
      &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;
      &lt;data android:host=&quot;myRegisteredDomain&quot; android:scheme=&quot;https&quot;/&gt;
      &lt;data android:host=&quot;myRegisteredDomain&quot; android:scheme=&quot;http&quot;/&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  <p>In firebase I have set up the domain as needed and it has been whitelisted. At this point I have no idea why I'm even getting this error as handleCodeInApp is set to true. I can only guess that my link is incorrect in some way, but I wouldn't know where I set it up wrong. If anyone knows where I went wrong or you need additional information, please tell me.</p>
  <p><strong>Solution</strong></p>
  <ol>
  <li><p>The Uri generated using the DynamicLinkParameters does not work. Just use a string like: &quot;https://PROJECT.page.link&quot;. This solved the error I was getting.</p>
  </li>
  <li><p>The isSignInWithEmailLink check from FirebaseAuth isn't working correctly with version ^0.20.0+1, which I was using. Reference <a href="https://github.com/FirebaseExtended/flutterfire/issues/4711#issuecomment-762323661" rel="nofollow noreferrer">https://github.com/FirebaseExtended/flutterfire/issues/4711#issuecomment-762323661</a> on how to fix this. After this fix I can now use Passwordless sign in as intended</p>
  </li>
  </ol>