I added origin without port to fix this issue.
Key Point: Add both http://localhost and http://localhost:<port_number> to the Authorized JavaScript origins box for local tests or development.
Source: https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid