[Feature Request] Support for the new personalized button
First off, thanks for the amazing library!
It seems like google recently(?) made an upgrade to the login button. It's now more personalized. developers.google.com/identity/gsi/web/guides/personalized-button
I've tried playing around with the library to get the personalized button to work but I'm coming up empty-handed. Is it possible to get support for this new button?
I'd be happy to make a PR if I could just get a hint on what needs to be done, and how cumbersome the implementation might be?
I came to this library because, even though it's trivial to get the button to show on the page (copy paste from here: developers.google.com/identity/gsi/web/guides/display-button ), it gave me an error I couldn't figure out how to solve, which I guess is the whole reason why this package exist.
invalid value for prop data-callback on <div> tag
Thanks!
Ah, it seems to be an entirely new api. The previous one is now labeled as "Legacy".
https://developers.google.com/identity/gsi/web/reference/js-reference
Let me know if you want help to convert to, or add additional support for the new api and I'll give it a try.
For anyone finding this, it's pretty straightforward to add the sign-in button with the new api. Although I haven't implemented the One Tap feature yet. I wrote a post about it. Hope it helps someone. https://dev.to/mremanuel/add-the-new-google-sign-in-to-your-react-app-p6m
Nice job @MrEmanuel I am also looking on how to do this. I don´t want a floating login (one tap) as I find this annoying and people are already blocking (https://superuser.com/questions/1414410/how-to-disable-google-one-tap-sign-up-prompts)
There are already some modules that do one tap if you are looking for this. (https://www.npmjs.com/package/react-google-one-tap-login)
I do think that a personalized button is better than a pop up forcing the user. I wish I could see your mods inside react-google-login module
@MrEmanuel Is support for the new API going to be coming in a future release?
@MrEmanuel Is support for the new API going to be coming in a future release?
I'm not a maintainer of this package so I unfortunately can't give you an answer.
I can only say that I'm not planning on making a PR. The implementation I need and use is documented in my article in the link in the previous comment
@leopucci With your TS/React example in the article, do you get any weird visual behaviour with the button while it loads?