Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sign in with Google error in script https://accounts.google.com/gsi/client

Started getting an error from the Google sign in script all of a sudden.

Error at _.$e in https://accounts.google.com/gsi/client

like image 843
barro32 Avatar asked Jul 17 '26 04:07

barro32


2 Answers

It seems like Google has changed the type of renderButton width from string to number.

Broken:

window.google.accounts.id.renderButton(button, {width: '200'});

Working:

window.google.accounts.id.renderButton(button, {width: 200});

They haven't updated the documentation: https://developers.google.com/identity/gsi/web/reference/js-reference#width

like image 123
barro32 Avatar answered Jul 19 '26 19:07

barro32


The recent update broke it if you specified the button width in a string format without the 'px' suffix.

window.google.accounts.id.renderButton(button, {width: '300px'});

should work.

like image 26
Drasko R Avatar answered Jul 19 '26 18:07

Drasko R



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!