JS React OAuth2

Greetings,

I’ve stumbled upon a problem with google OAuth 2.0 . When I click on the sign up button I get a blank page and a following error on the console:

When I searched for the solution, everyone said that their solution was setting https://localhost and https://localhost:3000 to their Authorized JavaScript origins, but I already had that so it is not because of that.

Does anyone have a clue what else could be causing this problem?