AppWerft / Ti.GoogleSignIn

Use the native Google Sign In SDK in Appcelerator Titanium. 🚀
Other
24 stars 12 forks source link

Error 401: Unauthorized, Invalid credentials accessing Google Drive #12

Closed electronic321 closed 6 years ago

electronic321 commented 7 years ago

After signing in, token received in response cannot be used for google drive authentication java.io.IOException: 401 : Unauthorized

Scope for google drive is provided as :
Google.initialize({ clientID : "***.apps.googleusercontent.com", scope : ['https://www.googleapis.com/auth/plus.login', 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata'] // Scope

});

Tested with token provided by OAuth 2.0 Playground(Google Developer) and it works as expected but the token received from module aren't validated while accessing google drive.

chmiiller commented 7 years ago

Hi @electronic321 , you can see on my answer in this issue https://github.com/AppWerft/Ti.GoogleSignIn/issues/5 a tool called "Google-Play-Service-Lite" which is useful to select what to use in your Google Play services (.jars). In this case, this app doesn't include any of the Google Drive jars, so I think this could be your problem. You might want to give it a try and see if it works for you.

chmiiller commented 6 years ago

Hi @electronic321 did you solve your problems? I'm curious to see if it is possible to use this module also for Google Drive. Can you give me a ping so I can close this issue? 👮 Thanks!