Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

My aim is sending email for sign up users using Firebase function and authentication. I followed Firebase example. But it tells below error message.

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

My code is at below.


const actionCodeSettings = {
    url: 'https://www.example.com/finishSignUp?cartId=1234',
    handleCodeInApp: true,
    iOS: {
      bundleId: 'com.example.ios'
    },
    android: {
      packageName: 'com.example.android',
      installApp: true,
      minimumVersion: '12'
    },
    dynamicLinkDomain: 'example.page.link'
};


exports.sendmail = functions.https.onRequest((req, res) => {
    return cors(req, res, () => {
        firebase.auth().sendSignInLinkToEmail("[email protected]", actionCodeSettings)
        .then((userCredential) => {
            res.status(200).send(userCredential);
            res.status(200).send(userCredential);
            return;
        })
        .catch(error => {
            // Handle Errors here.
            var errorCode = error.code;
            var errorMessage = error.message;
            console.log(error)
            // ...
            res.status(400).send(error);
        });
    });
});

Here are my configuration at my console.

enter image description here

like image 872
sungyong Avatar asked Apr 08 '19 01:04

sungyong


People also ask

What is Dynamic Links domain?

June 12, 2018. Firebase Dynamic Links are deep links that drive user growth and engagement by allowing you to send users to specific places in your app - across iOS, Android, and the web.

How to add URL prefix Firebase?

Open the Dynamic Links page of the Firebase console. If you haven't used Dynamic Links before, click Get Started. Otherwise, click Add URL prefix from the drop-down menu. Then, complete the setup wizard, specifying the domain and path prefix you want to use when prompted.

How do you debug a firebase dynamic link?

To help you debug your Dynamic Links, you can preview your Dynamic Links' behavior on different platforms and configurations with an automatically-generated flowchart. Generate the flowchart by adding the d=1 parameter to any short or long Dynamic Link. For example, example. page.


1 Answers

example.page.link is not configured as a dynamic link domain for your project.

You need to use one you own. You can get that from "Dynamic Links" under "Grow" in the left menu of the Firebase Console.

If you don't need to use dynamic links with mobile flows, just change to:

const actionCodeSettings = {
  // Replace this URL with the URL where the user will complete sign-in.
  url: 'https://www.example.com/finishSignUp?cartId=1234',
  handleCodeInApp: true
};
like image 155
bojeil Avatar answered Sep 28 '22 04:09

bojeil