Login with google issue

hey guys login with google works in localhost I just deployed with mupx to digital ocean and for other social logins working fine (I set the correct urls for prod.) but for google when user try to login after selecting google account Im getting this on server log

Exception while invoking method ‘login’ Error: Failed to fetch tokeninfo from Google. getaddrinfo ENOTFOUND

some say it is dns related but I test to ping google.com on server looks fine. any idea how to fix it?

google.com isn’t the requested domain. To get token info, https://www.googleapis.com/oauth2/v1/tokeninfo is used. Can you access this URL from your host?

yeap I was trying that both from local and server I can reach/ping www.googleapis.com

curl https://www.googleapis.com/oauth2/v1/tokeninfo
{
 "error": "invalid_request",
 "error_description": "either access_token, id_token, or token_handle required"
}

but somehow meteor can’t I believe.

Maybe try dumping the server side result of the tokeninfo request - so via your DO deployed app, wire something up to call the following server side:

console.log(
  HTTP.get(
    'https://www.googleapis.com/oauth2/v1/tokeninfo',
    { params: { access_token: 'your-access-token' } }
  )
);

This should help troubleshoot further.

on server side only very few request actually responded somehow.

root@monimen:~# curl https://www.googleapis.com/oauth2/v1/tokeninfo
{
 "error": "invalid_request",
 "error_description": "either access_token, id_token, or token_handle required"
}
root@monimen:~# curl https://www.googleapis.com/oauth2/v1/tokeninfo
curl: (6) Could not resolve host: www.googleapis.com
root@monimen:~# curl https://www.googleapis.com/oauth2/v1/tokeninfo
curl: (6) Could not resolve host: www.googleapis.com

with code

sometimes Im getting this

Exception while invoking method 'login' Error: Failed to fetch identity from Google. getaddrinfo EIO
at getIdentity (packages/google/google_server.js:81:1)

or (with HTTP.get)

Exception while invoking method 'testGoogle' Error: getaddrinfo ENOTFOUND

but sometimes it just works. so what should be the real issue here?