react-oauth icon indicating copy to clipboard operation
react-oauth copied to clipboard

Google logo missing but sso working

Open KoushikVanama opened this issue 1 year ago • 2 comments

I am getting 400 bad request error for this api. This api gets called when your page (login or index) gets loaded and return the html of the button. This below api gives 400 bad request error(see below image) in production but in localhost its working fine.

https://accounts.google.com/gsi/button?type=icon&theme=outline&size=large&text=undefined&shape=pill&logo_alignment=undefined&width=undefined&locale=undefined&click_listener=undefined&client_id=780874297945-onnb84i8bmuaeli6vgpf2onch4up9r4o.apps.googleusercontent.com&iframe_id=gsi_832192_371730&as=b7N5%2FZ1fsOGujD%2FFlSZ9rA

Screenshot 2024-07-09 at 11 27 51 PM

As you can see below I only get the round icon but not the G logo inside it. I have added my domain in console and our domain is https only. Any potential findings that you find in this usecase?

image

version: 0.12.1

KoushikVanama avatar Jul 09 '24 18:07 KoushikVanama

@KoushikVanama I'm facing the exact same issue. Did you find any solutions to that?

ZtheLeader avatar Oct 14 '24 19:10 ZtheLeader

I figured out the issue. My site uses different TLDs, and it wasn't working for some of them. Upon investigation, I discovered that the domains were not listed in the Google Console Manager. After adding the missing TLD URLs, it started working. However, you must include the full URL with the protocol.

For example, "www.github.com/" may not work, but "https://www.github.com/" will. Hope this helps others!

ZtheLeader avatar Oct 15 '24 09:10 ZtheLeader