qgustavor / mega

Unofficial JavaScript SDK for MEGA
https://mega.js.org/
MIT License
161 stars 43 forks source link

Add support to 2FA #144

Closed qgustavor closed 1 year ago

qgustavor commented 1 year ago

My account uses 2FA, so it need it implemented. Also updated error codes.

Deduplicated some code and added a note about deleting the password since some people removed this line in forks. Maybe someone might post the result of a console.log(storage) with the password, which is something someone could easily notice as being a secret. The sid and key are also secrets, but those cannot be deleted since the library needs them to work with the API, the password is only used during login.