flutterdartfirebase-authentication

firebase email verify redirect requires dynamic links, which will be shut down soon


I want to redirect back to my app after completing firebase email verification email.this is the code that I use.

User? user = FirebaseAuth.instance.currentUser;
if (user != null && !user.emailVerified) {
var actionCodeSettings = ActionCodeSettings(
  url: 'https://www.example.com/?email=${user.email}',
  dynamicLinkDomain: 'example.page.link',
  androidPackageName: 'com.example.android',
  androidInstallApp: true,
  androidMinimumVersion: '12',
  iOSBundleId: 'com.example.ios',
  handleCodeInApp: true,
);
await user.sendEmailVerification(actionCodeSettings);
}

I have replaced my domain and other parts.but I get this:

Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions. [ FDL domain is not configured ]

and when I go to firebase console for dynamic links it says it will be shutdown soon.So what should do?


Solution

  • From the Firebase Dynamic Links Shutdown FAQ:

    I'm currently using or need to use Dynamic links for email link authentication in Firebase Authentication. Will this feature continue to work after the sunset?

    Yes, your email link authentication using Firebase Authentication will continue to work.

    Firebase Authentication currently uses Firebase Dynamic Links to customize Authentication links, but we will provide an update that will require a client- side update to ensure that email link auth continues working after the Firebase Dynamic Links service is shut down.

    Note that Firebase Authentication only depends on the Firebase Dynamic Links service internally, but does not depend on the Firebase Dynamic Links SDK.