Refactor and enhance authentication and email flows #213

Merged
rwachters merged 12 commits from add-email-device-verification-flow into master 2026-05-15 17:15:49 +00:00
rwachters commented 2026-05-15 17:15:08 +00:00 (Migrated from github.com)

Summary

This pull request introduces major refactors and new features to improve authentication and email-related workflows.

Key Changes

Authentication

  • Services Refactored: Extracted token, device trust, security audit, and account management into dedicated services.
  • ViewModels Restructured: Replaced monolithic AuthViewModel with focused viewmodels (entry, session, account, security, profile).
  • Session Dialog Decoupled: Optimized verification handling and reduced direct coupling in RestrictedSessionInfoDialog.
  • Error Mapping Added: Improved error mapping for login, registration, email changes, and device verification, including new retry-after handling.
  • Device Verification Workflow Expanded: Introduced public and email-based device verification, adding UI prompts and backend endpoints.

Email

  • SMTP Enhancements: Improved configuration defaults, added support for debug logging, and modernized TLS settings.
  • Device Verification Flow: Implemented secure email notification of device verification requests via SMTP.
  • Email Change Flow: Added email change functionality with UI dialogs, API endpoints, and validations.

Miscellaneous

  • Build Changes: Disabled Compose hotreload plugin while retaining configuration for future use.

Testing

  • Updated and added tests for all new and refactored functionalities, including:
    • Authentication flows and device verification.
    • Email workflows and error cases.
    • Security and state persistence.

Notes

  • These updates enhance modularity, security, and usability across authentication and email experiences.
--- ### Summary This pull request introduces major refactors and new features to improve authentication and email-related workflows. ### Key Changes #### Authentication - **Services Refactored:** Extracted token, device trust, security audit, and account management into dedicated services. - **ViewModels Restructured:** Replaced monolithic `AuthViewModel` with focused viewmodels (entry, session, account, security, profile). - **Session Dialog Decoupled:** Optimized verification handling and reduced direct coupling in `RestrictedSessionInfoDialog`. - **Error Mapping Added:** Improved error mapping for login, registration, email changes, and device verification, including new retry-after handling. - **Device Verification Workflow Expanded:** Introduced public and email-based device verification, adding UI prompts and backend endpoints. #### Email - **SMTP Enhancements:** Improved configuration defaults, added support for debug logging, and modernized TLS settings. - **Device Verification Flow:** Implemented secure email notification of device verification requests via SMTP. - **Email Change Flow:** Added email change functionality with UI dialogs, API endpoints, and validations. #### Miscellaneous - **Build Changes:** Disabled Compose hotreload plugin while retaining configuration for future use. ### Testing - Updated and added tests for all new and refactored functionalities, including: - Authentication flows and device verification. - Email workflows and error cases. - Security and state persistence. ### Notes - These updates enhance modularity, security, and usability across authentication and email experiences.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot!213
No description provided.