Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
Why am I getting a Firebase INVALID_DYNAMIC_LINK_DOMAIN error?

I tried to add email verification in my React website but nothing seems to be working. When I initiate the sendSignInLinkToEmail function, it returns this error:

XHRPOSThttps://identitytoolkit.googleapis.com/v1/accounts:sendOobCode?key=xxxxxxxxxxxxxxxxxxx
[HTTP/3 400 Bad Request 487ms]

{
  "error": {
    "code": 400,
    "message": "INVALID_DYNAMIC_LINK_DOMAIN",
    "errors": [
      {
        "message": "INVALID_DYNAMIC_LINK_DOMAIN",
        "domain": "global",
        "reason": "invalid"
      }
    ]
  }
}

Code in question:

export const registerWithEmailAndPassword = async (name, email, password) => {
  try {
    await sendSignInLinkToEmail(auth, email, actionCodeSettings)
      .then(() => {
        // The link was successfully sent. Inform the user.
        // Save the email locally so you don't need to ask the user for it again
        // if they open the link on the same device.
        window.localStorage.setItem("emailForSignIn", email);
        console.log("test");
        // ...
      })
      .catch((error) => {
        const errorCode = error.code;
        const errorMessage = error.message;
        // ...
      });
      
    const res = await createUserWithEmailAndPassword(auth, email, password);
    const user = res.user;
    await addDoc(collection(db, "users"), {
      uid: user.uid,
      name,
      authProvider: "local",
      email,
    });
  } catch (err) {
    console.error(err);
    alert(err.message);
  }
};

actionCodeSettings:

const actionCodeSettings = {
  // URL you want to redirect back to. The domain (www.example.com) for this
  // URL must be in the authorized domains list in the Firebase Console.
  url: "https://MYIPADDRESS:3000/",
  // This must be true.
  handleCodeInApp: true,
  iOS: {
    bundleId: "com.example.ios",
  },
  android: {
    packageName: "com.example.android",
    installApp: true,
    minimumVersion: "12",
  },
  dynamicLinkDomain: "https://MYIPADDRESS:3000/",
};

The problem probably lies in the actionCodeSettings, I want my website to redirect to root after performing the registration. By the way, I am locally hosting this website, it is not public, that's why I added my ip address for the url. I have also added my ip to the authorized urls in Firebase. Also registration is on MYIPADDRESS:3000/register

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

An IP address is no domain name known to DNS - and a local IP address will defintely not work.
You'd have to register a valid domain name at any domain registrar (no server required) and then add it there: https://console.firebase.google.com/project/_/durablelinks/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!