protonmail-export icon indicating copy to clipboard operation
protonmail-export copied to clipboard

Send authentication request too

Open emersion opened this issue 9 years ago • 2 comments

For now, you need to provide a session and a cookie. Thus, making an automated program which backups emails is not possible.

Instead, do the authentication request in the app and allow users to provide their username, login password and mailbox password.

emersion avatar Nov 24 '16 13:11 emersion

I tried to make it, it was more complicated than I thought, the retro-engineering phase is not as easy as it was for mail fetching. Feel free to make a PR if you know how to do it ;)

scastiel avatar Nov 24 '16 14:11 scastiel

If someone wants to do it, here are some hints:

  • The authentication code is here: https://github.com/ProtonMail/WebClient/tree/public/src/app/authentication/services
  • The srp.js and passwords.js fiels are libraries for ProtonMail's SRP
  • To login, you first have to perform an SRP authentication: https://github.com/ProtonMail/WebClient/blob/public/src/app/authentication/services/auth.js#L366
  • Then unlock the private key: https://github.com/ProtonMail/WebClient/blob/public/src/app/authentication/services/auth.js#L508

emersion avatar Jan 16 '17 20:01 emersion