protonmail-export
protonmail-export copied to clipboard
Send authentication request too
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.
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 ;)
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.jsandpasswords.jsfiels 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