Skip to content

Handling Delete in backend  #6

@AshokaJS

Description

@AshokaJS

Approach :-

  1. User Requests Account Deletion
    • extract the user_id from the the JWT token.
    • update the database set is_deleted= true, deleted_at= current_time
    • this marks the account as "soft-deleted".
  2. User tries to login again within 90 days.
    • during login, after verifying Github OAuth check if the user is soft deleted.
    • if deleted_at + 90 days > now then user is within grace period.
    • reverse the deletion by deleted = false, deleted_at = NULL.
  3. Background Job runs daily.
    • run a scheduled Job once a day using cron package.
    • it runs the query and permanently deletes the user whose deleted_at timestamp is older than 90 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions