Great question — answering as the UphillTech team:
Here you've set http://localhost:3000 as an authorized JavaScript origin and http://localhost:8000/api/callback as an authorized redirect URI in the Google Cloud Console. But when the locally running instance of your app tries to perform the authentication, it sends a request to the Google O Auth Server using your public IP address (like for example 106.192.250.226 ) which does not match the Authorised JS Origin you've registered in the G-Cloud Console. This mismatch makes the O Auth Server to reject your request. For testing you local app instance, you can make use of some reverse proxy tools like ngrok which will expose your local dev server to internet and also provide you with a fance...
Full answer by Shrivatsa Shetty: https://stackoverflow.stackexchange.com/a/80014018 (CC BY-SA 4.0).
Need it done for your business? UphillTech.