Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

374
Vistas
Why is Firebase email verification giving me a http 400 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=XXXXXXXXXXXXXXXXXXXX
[HTTP/3 400 Bad Request 455ms]
{
  "error": {
    "code": 400,
    "message": "INVALID_CONTINUE_URI : Missing domain in continue url",
    "errors": [
      {
        "message": "INVALID_CONTINUE_URI : Missing domain in continue url",
        "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: "/",
  // This must be true.
  handleCodeInApp: true,
  iOS: {
    bundleId: "com.example.ios",
  },
  android: {
    packageName: "com.example.android",
    installApp: true,
    minimumVersion: "12",
  },
  //dynamicLinkDomain: "example.page.link",
};

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.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The error means:

The continue URL must be a valid URL string.

So... you got that right, / is a valid URL string. But the response "Missing domain in continue url" suggests that it must be an absolute URL. So this is not valid:

  // 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: "/",

Put the full URL of your website there, including http:// or https:// and the domain name. And, as the comment mentions, make sure it's authorized in the Firebase Console.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda