Forwarding "Firebase Email Link Authentication" link in Windows removes '/' from Action URL's scheme

Viewed 75

I'm using Firebase Email Link Authentication to login users into my app. It's working as expected but when forwarding the received email on Microsoft Mail Clients (like Outlook or Windows Mail) it stops working. This also happens on Mac OS when using Outlook. The problem is that after forwarding it the link has changed from

https://appdev.page.link/?link=https://...

to

https://appdev.page.link/?link=https:/...

Any idea what the cause for the problem could be? Is there a way to configure url encoding in Firebase Dynamic Links or Firebase Email Link Authentication?

The code I'm using is

Future<void> sendSignInLinkToEmail(String email) async {
  final parameters = DynamicLinkParameters(
    uriPrefix: 'https://app.page.link',
    link: Uri.parse('https://app.de/signUp'),
    androidParameters: AndroidParameters(
      packageName: 'de.app.dev',
      minimumVersion: 100,
    ),
    iosParameters: IosParameters(
      bundleId: 'de.app.dev',
      minimumVersion: '1.0.0',
    ),
  );

  final dynamicUrl = (await parameters.buildShortLink()).shortUrl;

  final actionCodeSettings = ActionCodeSettings(
    url: dynamicUrl.toString(),
    handleCodeInApp: true,
    iOSBundleId: 'de.app.dev',
    androidPackageName: 'de.app.dev',
    androidInstallApp: true,
    androidMinimumVersion: '21',
  );

  return await _firebaseAuth.sendSignInLinkToEmail(
    email: email,
    actionCodeSettings: actionCodeSettings,
  );
}
0 Answers
Related