Closed Ramsteven closed 3 years ago
My guess is wrong login/password or 2FA is required.
the data is well, but I had to change the unsecured application access from Gmail then I could sign_in from Node, this could be very insecure, exist another better way to get the authentication with had to change the password?
Yes, use 2FA instead of a plain password. See the xoauth2
config option in the readme.
Will save some time for others devs.
You have to go to security settings in gmail and turn switcher to allow connections to IMAP server.
Go to https://myaccount.google.com/
Go to Security
section on the left navigation panel.
Find Less secure app access
block, it is somewhere below, scroll to it.
Turn it to ON
P.S. and you have to enable IMAP in gmail settings in Forwarding and POP/IMAP
section, which is here: https://mail.google.com/mail/u/1/#settings/fwdandpop
Guess it worth to add that into main README.
Btw great module, ty ppl. Lacking async/await, but it work flawlessly.
Now you must use app password
instead of Less secure app access
: https://support.google.com/accounts/answer/185833
hello, I am having this below error, when trying to authenticate to Gmail, with the first example code: