Archived Forum Post

Index of archived forum posts

Question:

GMail with OAuth2 Authentication?

Nov 30 '15 at 17:01

I have an app that uses the Chilkat libraries to provide IMAP access to Gmail. I spent time today to figure out how to access their Gmail accounts securely so they don’t have to turn on this option:

https://www.google.com/settings/u/1/security/lesssecureapps

I can see that Chilkat now supports Oauth2 access, but from my time in working with this protocol in testing, I am unable to use it to access Gmail accounts.

Is there a way, short of every user providing a p12 file to allow my app to access their accounts without forcing them to turn on this Gmail option to access it “in a less secure fashion” as Gmail puts it?


Answer

I've never been able to get OAuth2 authentication working for a consumer Gmail account. I've only had success getting it to work with a paid Google Apps account ( https://support.google.com/a/answer/3035792?hl=en ). My suspicion is that OAuth2 is only an option for the paid Google Apps account where the email address is not "something@gmail.com".