Tpixelminer
Tpixelminer

Reputation: 41

Meteor Google OAuth Error: "Failed to complete OAuth handshake with Google" Error 401 Unauthorized

I've been trying to set up Google OAuth Login on my Meteor Web App and I've been getting this error every time I try to log in. I've verified the domain on the search console and added the correct redirect URI's and Javascript origins. The Google login works up until this point. Sorry if I haven't given enough information but is there any other reason that could be causing this error?

Btw I also tried to set the ROOT_URL like this: ROOT_URL="https://domainnamehere.com" meteor deploy when I deploy to galaxy hosting but when I try typing Meteor.absoluteUrl in the browser console, I get this error:

"Must pass options.rootUrl or set ROOT_URL in the server environment...

This is the main error that I've been getting though:

2021-10-04 18:05:17-04:00{"line":"405","file":"oauth_server.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [401] { \"error\": \"invalid_client\", \"error_description\": \"Unauthorized\" }","time":{"$date":1633385117461},"level":"warn"}8136p
2021-10-04 18:05:17-04:00Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Google. failed [401] { "error": "invalid_client", "error_description": "Unauthorized" }8136p
2021-10-04 18:05:17-04:00 at getTokens (packages/google-oauth/google_server.js:105:7)8136p
2021-10-04 18:05:17-04:00 at Object.getServiceData [as handleOauthRequest] (packages/google-oauth/google_server.js:80:58)8136p
2021-10-04 18:05:17-04:00 at OAuth._requestHandlers.<computed> (packages/oauth2/oauth2_server.js:10:33)8136p
2021-10-04 18:05:17-04:00 at middleware (packages/oauth/oauth_server.js:170:5)8136p
2021-10-04 18:05:17-04:00 at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:408136p
2021-10-04 18:05:24-04:00{"line":"405","file":"oauth_server.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Google. failed [401] { \"error\": \"invalid_client\", \"error_description\": \"Unauthorized\" }","time":{"$date":1633385124123},"level":"warn"}8136p
2021-10-04 18:05:24-04:00Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Google. failed [401] { "error": "invalid_client", "error_description": "Unauthorized" }

Upvotes: 0

Views: 250

Answers (0)

Related Questions