This is a very common issue that gets brought up in the QA quite a bit. In general, this is an expected error that you will get at this point in the course, after making the request to localhost:5000/auth/google. If you let the browser continue loading, it will eventually timeout with this error. Or, after a successful request, you attempt to reload your browser.
A quick check to determine if there is a problem:
Are you getting the user's data logged to the console?
If you are at the lecture where we are saving a user, is the user saved to your Mongo Atlas DB?
The Bad Request error only occurs after allowing the browser to load for a while.
The Bad Request error only occurs if you attempt to reload the page after a successful authentication request.
If you have answered yes to these questions, this is expected, there is likely no issue with your code.
If any of these applies to you:
The Bad Request error shows up immediately
Your server terminal shows errors, such as MongoNetworkError or a MongoAuthError
There are no console logs in your terminal
If you are at the lecture where we are saving a user, no user is saved to the database
The Bad request error occurs on Heroku, not on localhost.
Then, there likely is a bug in the code or with the project's configuration. In this case, please create a new question thread in the QA and share your full project code in a Github Repo, so that it can be tested.
Note: If you are getting a MongoNetworkError in your terminal then you need to add your IP address to the access list for your project in the Mongo Atlas Dashboard. If your IP address changes frequently, you should add a global access policy to the access list: 0.0.0.0/0