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

139
Vistas
Google Identity Services Login with React

I'm trying to implement Google Identity Services Login without third parties, everything works well because I get the response when I try to sign in, except for the error shown in the console:

"Failed to load resource: the server responded with a status of 401 ()"

This is my code:

useEffect(() => {
    try {
      google.accounts.id.initialize({
        client_id:
          "CODE.apps.googleusercontent.com",
        callback: handleCallbackResponse,
      });

      google.accounts.id.renderButton(document.getElementById("buttonDiv"), {
        theme: "outline",
        size: "large",
        text: "continue_with",
      });

      window.google.accounts.id.prompt();
    } catch (e) {
      alert("Error", e);
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);


function handleCallbackResponse(response) {
    //code
  }

return (<div id="buttonDiv"></div>)
about 4 years ago · Santiago Trujillo
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