yagmail icon indicating copy to clipboard operation
yagmail copied to clipboard

Scope for OAuth2 not as narrow as documented

Open FlxVctr opened this issue 3 years ago • 3 comments

The README says, OAuth2 should only give permissions to send. However it goes beyond that, actually gives full control over account.

I guess the scope has to be changed to https://www.googleapis.com/auth/gmail.send here

FlxVctr avatar Mar 29 '21 17:03 FlxVctr

The problem is that in fact I've tried limiting the scope many times, but it then doesn't work. It's a bug in gmail I'm sure by now (less open permissions simply don't work).

FWIW: my recommendation is to use an app-specific password instead of OAuth2

kootenpv avatar Mar 30 '21 11:03 kootenpv

K, thx for the quick reply!

FlxVctr avatar Mar 30 '21 14:03 FlxVctr

Maybe still update the README, though :)

FlxVctr avatar Mar 30 '21 14:03 FlxVctr