refactor AuthService

The current AuthService has grown to over 1,700 lines and mixed user authentication, token handling, and email flows to social logins (Google/Apple), verification codes, and event publishing. it is might be hard to main and read,

We can break it down into different services:

  • UserAuthService – Handles user registration, login, password changes, email updates, and token-based login/logout.

  • SocialAuthService – Takes care of Google/Apple login, account linking, token validation, and OAuth-related logic.

  • VerificationService – Manages verification code generation, validation, and formatting for emails, password resets, and secondary email flows.

There's also some duplicated logic like , sending events through the networking layer—which we can move to a shared method,

Domain
AuthN-Z
Action
refactor
Department
Backend

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
💡

Feature Request

Tags

Low Priority

Date

11 months ago

Author

tadael shewarega

Subscribe to post

Get notified by email when there are changes.