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

171
Vistas
Sign in Google - Customize button appearance

I use the following code to authenticate a user on my website:

function handleCredentialResponse(response) {
  console.log("Encoded JWT ID token: " + response.credential);

window.onload = function() {
  google.accounts.id.initialize({
  client_id: "XXXXXXX.apps.googleusercontent.com",
  callback: handleCredentialResponse
});
google.accounts.id.renderButton(
 document.getElementById("buttonDiv"),
 { theme: "outline", size: "large" }
);

<div id="buttonDiv"></div>

But I need to customize the button with the design of my site...

Is it possible to create my own button like this ?

<button type="button" onclick="googleLogin();">Connection with Google</button>

And with the onlick I can connect. I tested several variants but it does'nt work, the initialization does'nt happen...

how i can customize the button keeping the current code (or just modifying it a bit) ?

Do you have an idea ?

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

0

Okay, probably there is no other way to modify the button style other than using renderButton options or just simply CSS.

But there is another option, there is a 'second' API. Afaik, that JS API is considered outdated and Google wants you to use the second one.

So it's here about integrating it into an app, and here about customizing the button itself.

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