Firebase dynamic links to reset password : not configured for the current project

Viewed 153

I am using a Cloud Function to generate a password-reset-link through the admin sdk.

I need to handle the action link in my website and not my mobile app.

my action code settings looks like :

ActionCodeSettings codeSettings = ActionCodeSettings(
        url: "https://example.com/links/reset",
      handleCodeInApp: false,
      dynamicLinkDomain: "https://example.com/links"
    );

and i have also tried :

ActionCodeSettings codeSettings = ActionCodeSettings(
        url: "https://example.com/links/reset",
      handleCodeInApp: false,
    );

Both gives me the following error :

FirebaseAuthError: The provided dynamic link domain is not configured or authorized for the current project.

I am simply using the : admin.auth().generatePasswordResetLink(data.email, actionCodeSettings) method in an onCall https request to my function.

I have of course setup dynamic links for my project and my project is hosted fine with Firebase Hosting.

I have also added this to my firebase.json file :

"rewrites": [ {
  "source": "/links/**", 
  "dynamicLinks": true
} ]

As stated in the documentation.

What i am doing wrong ?

1 Answers

If i generate the ActionCodeSettings from flutter it doesn't work.

However, if in my NodeJS code I implement :

const actionCodeSettings = {
    url: "https://example.com/links",
    handleCodeInApp: false
  };

It's working.

In the logs i could see that the param dynamicLinkDomain was set to null and passed even if i was not using it.

Related