email-frappejs / frappejs

Node + Electron + Vue based metadata web framework (inspired by Frappe)
0 stars 2 forks source link

Finding generic solution for 2FA #4

Open accakks opened 6 years ago

accakks commented 6 years ago

Okay, so it works two ways:

  1. If we try to access Gmail with just username and password, it rejects our login and we get a mail "rejected login from less secured app" Unless we allow less secured apps in gmail settings, it doesn't work.

  2. For 2FA "oauth2", we need clientId, clientSecretKey from google api console. And refresh token for those clientId and secret key from google oauth2 playground.

Refer this video for more details: https://www.youtube.com/watch?v=JJ44WA_eV8E

So we need to find a solution for this. It should work this way: Asking user mail and password and other settings, and workout 2FA behind the scenes or some other way.

accakks commented 6 years ago

Also authentication and stuff should common for both receiver.js and sender.js obviously

accakks commented 6 years ago

https://developers.google.com/gmail/api/auth/web-server