Skip to content

feat: Implement account registration functionality#59

Open
Roktiiv wants to merge 1 commit into
opulentfox-29:masterfrom
Roktiiv:feat/account-registration
Open

feat: Implement account registration functionality#59
Roktiiv wants to merge 1 commit into
opulentfox-29:masterfrom
Roktiiv:feat/account-registration

Conversation

@Roktiiv

@Roktiiv Roktiiv commented Jul 11, 2025

Copy link
Copy Markdown

This commit introduces the ability to register new ProtonMail accounts through the API client.

Key changes include:

  • New methods in the ProtonMail class:
    • get_username_available: Checks if a username is available.
    • send_verification_code: Sends a verification code to an email address.
    • create_user: Creates a new user account, handling SRP and CAPTCHA.
  • Updated SRP helper functions in utils/pysrp.py to support verifier generation for new accounts.
  • New data models in models.py for registration-related requests and responses.
  • New exception classes in exceptions.py for registration-specific errors.
  • Updated constants.py with necessary values for registration.
  • Refactored CAPTCHA handling in client.py to be more generic and reusable by both login and registration flows.
  • Added a comprehensive suite of unit tests in tests/test_registration.py covering various scenarios, including CAPTCHA.
  • Updated README.md with documentation and examples for the new registration features.

All new tests are passing.

This commit introduces the ability to register new ProtonMail accounts
through the API client.

Key changes include:
- New methods in the `ProtonMail` class:
    - `get_username_available`: Checks if a username is available.
    - `send_verification_code`: Sends a verification code to an email address.
    - `create_user`: Creates a new user account, handling SRP and CAPTCHA.
- Updated SRP helper functions in `utils/pysrp.py` to support
  verifier generation for new accounts.
- New data models in `models.py` for registration-related requests
  and responses.
- New exception classes in `exceptions.py` for registration-specific errors.
- Updated `constants.py` with necessary values for registration.
- Refactored CAPTCHA handling in `client.py` to be more generic and
  reusable by both login and registration flows.
- Added a comprehensive suite of unit tests in `tests/test_registration.py`
  covering various scenarios, including CAPTCHA.
- Updated `README.md` with documentation and examples for the new
  registration features.

All new tests are passing.
@Roktiiv

Roktiiv commented Jul 11, 2025

Copy link
Copy Markdown
Author

god

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant