'How to make google signin work on localhost

Google sign-in doesn't work. I tried cleaning the cache as mentioned here.
I even tried using a completely different web browser but it still does not work.

localhost 5000 is not a valid domain image

I made sure to mark the domain as authorized but it still does not want to work.

the domain is marked as authorized

When pressing the login button, The popup shows just fine. There is no error whatsoever, but once I choose my email account, the loading spinner shows and the popup closes after some time.

Please someone help me.

Loading spinner



Solution 1:[1]

Unfortunately there is no native solution but you can use a third-party service like ngrok to get the job done. And here is a very good tutorial how to achieve that. Local Auth test with ngrock

Solution 2:[2]

Try adding http://localhost as well to the list of authorized Javascript origins.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pedro Barreto
Solution 2 Kayef