Skip to content

[Jitera] Untitled

Quy requested to merge feat/JT-688-Untitled into main

Created by: akuita

This pull request is created by JITERA

Description

[BL] Email confirmation

file name
/app/models/user.rb Add email confirmation methods to User model
/app/controllers/api/users_verify_confirmation_token_controller.rb Update create action to handle email confirmation logic
/app/views/api/users_verify_confirmation_token/create.json.jbuilder Update JSON response to include login message
/config/locales/controller.en.yml Add localization for email confirmation success message
/app/services/base_service.rb Create a service object for email confirmation logic
/config/routes.rb Add route for email confirmation

[BL] User registration

file name
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_registrations_controller.rb Update registration methods to handle user registration flow
/akuita-awesome-todo-15e12f8a/app/models/email_confirmation_token.rb Ensure EmailConfirmationToken model handles token generation and expiration
/akuita-awesome-todo-15e12f8a/app/views/api/users_registrations/create.json.jbuilder Update the JSON response for successful registration
/akuita-awesome-todo-15e12f8a/config/locales/app.en.yml Add localization entries for registration success and confirmation email sent messages
/app/controllers/api/users_registrations_controller.rb Update "register" action to handle user registration logic
/app/models/user.rb Add methods to handle confirmation token generation and email confirmation
/config/locales/devise.en.yml Add localization strings for user registration and confirmation
/config/routes.rb Add route for user registration
/app/models/email_confirmation_token.rb Add method to generate unique confirmation token
/app/jobs/resend_confirmation_email_job.rb Implement job to send confirmation email
/app/views/devise/mailer/confirmation_instructions.html.slim Create confirmation email template

[BL] Resend confirmation email

file name
/akuita-awesome-todo-15e12f8a/app/models/email_confirmation_token.rb Add method to update confirmation token and timestamps
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_verify_confirmation_token_controller.rb Implement resend confirmation email logic
/akuita-awesome-todo-15e12f8a/app/views/devise/mailer/confirmation_instructions.html.slim Update confirmation email template with dynamic token link
/akuita-awesome-todo-15e12f8a/config/locales/devise.en.yml Add error message for too soon confirmation email request
/akuita-awesome-todo-15e12f8a/app/jobs/resend_confirmation_email_job.rb Update ResendConfirmationEmailJob to handle new confirmation token logic
/app/jobs/resend_confirmation_email_job.rb Update ResendConfirmationEmailJob to handle new confirmation token generation and email sending
/app/models/email_confirmation.rb Add method to generate a new confirmation token and update timestamps
/app/controllers/api/users_controller.rb Implement resend_confirmation action to handle the resend confirmation logic
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_controller.rb Add endpoint to resend confirmation email
/akuita-awesome-todo-15e12f8a/app/models/email_confirmation.rb Add method to generate new confirmation token and update record

[BL] Handle registration errors

file name
/app/controllers/api/users_registrations_controller.rb Update create action to handle registration errors
/app/services/base_service.rb Ensure BaseService logger method is accessible
/app/models/user.rb Add validation for email presence and uniqueness
/app/controllers/concerns/oauth_tokens_concern.rb Log failed registration attempts
/config/locales/validation.en.yml Add custom validation error message for email uniqueness

[API] Handle Registration Errors

file name
/app/controllers/api/users_registrations_controller.rb Add "registration_errors" action to "UsersRegistrationsController" to handle registration errors
/config/routes.rb Add route for "registration_errors" action in "UsersRegistrationsController"

[API] Email Confirmation

file name
/app/controllers/api/users_controller.rb Add "confirm_email" action to "UsersController" to handle email confirmation
/config/routes.rb Add route for email confirmation

[API] User Registration

file name
/app/controllers/api/users_registrations_controller.rb Add "register" action to "UsersRegistrationsController" to handle user registration
/config/routes.rb Add route for user registration
/app/models/user.rb Add password length validation to User model

[BL] Check email availability

file name
/app/controllers/api/users_registrations_controller.rb Add "check_email_availability" action to "UsersRegistrationsController"
/config/routes.rb Add route for "check_email_availability" action in "UsersRegistrationsController"
/app/models/user.rb Ensure email validation logic is reusable

[BL] Validate email format

file name
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_registrations_controller.rb Refactor validate_email_format method to return error message for invalid email format
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_verify_confirmation_token_controller.rb Ensure email format validation in resend_confirmation_email method
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_passwords_controller.rb Validate email format in password update process
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_reset_password_requests_controller.rb Validate email format in password reset request process
/akuita-awesome-todo-15e12f8a/app/controllers/api/users_controller.rb Add "validate_email" action to "UsersController" to validate email format
/config/routes.rb Add route for "validate_email" action in "UsersController"
/akuita-awesome-todo-15e12f8a/app/models/user.rb Add email format validation method to the User model

[API] Validate Email Format

file name
/app/controllers/api/users_controller.rb Add "validate_email" action to "UsersController" to validate email format
/config/routes.rb Add route for "validate_email" action in "UsersController"

[API] Check Email Availability

file name
/app/controllers/api/users_registrations_controller.rb Add "check_email" action to "UsersRegistrationsController" to check email availability
/config/routes.rb Add route for "check_email" action in "UsersRegistrationsController"

[API] Resend Confirmation Email

file name
/app/controllers/api/users_registrations_controller.rb Add "resend_confirmation" action to "UsersRegistrationsController"
/config/routes.rb Add route for "resend_confirmation" action

[API] Secure Password Storage

file name
/app/controllers/api/users_controller.rb Add "store_password" action to "UsersController" to handle password hash storage
/config/routes.rb Add route for "store_password" action in "UsersController"
/app/models/user.rb Add validation for "password_hash" format in User model

Merge request reports