---
title: "Cleaning Up Ghost Users After OTP Registration in .NET"
url: https://daily.dev/posts/cleaning-up-ghost-users-after-otp-registration-in-net-aukradz4n
source_url: https://mwaseemzakir.substack.com/p/cleaning-up-ghost-users-in-dotnet
type: article
source: "Waseem .NET Newsletter"
published: 2026-07-25T04:09:30.276Z
updated: 2026-07-25T04:37:11.596Z
tags: [".net"]
reading_time: 10
upvotes: 4
comments: 1
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Cleaning Up Ghost Users After OTP Registration in .NET

**[Waseem .NET Newsletter](https://daily.dev/sources/mwaseemzakir)** · 10 min read · 4 upvotes · 1 comments

## Summary

When users start registration but never verify their OTP, their rows linger as 'ghost users' — polluting metrics and blocking email reuse. The solution is to model unverified signups explicitly with a Pending status, flip to Active only on OTP verification, add a partial index on pending rows for cheap scans, and run a Quartz.NET background job every 15 minutes to hard-delete anyone who never verified within a configurable window. Two-table separation (pending_users vs users) is also discussed as an alternative for high-query-load scenarios. Bonus considerations include decoupling OTP sending via domain events, the outbox pattern for delivery guarantees, rate limiting on registration endpoints, and making the cleanup job safe for multi-instance deployments.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mwaseemzakir.substack.com/p/cleaning-up-ghost-users-in-dotnet>

## Similar posts on daily.dev

- [\[HOWTO\] Delete users created by bots in Azure AD B2C](https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn) · We Are .NET · 0 upvotes · 0 comments
- ["Just Delete the User": Famous Last Words Before the GDPR Audit — Daily DevOps & .NET](https://daily.dev/posts/just-delete-the-user-famous-last-words-before-the-gdpr-audit-daily-devops-net-udih4gtns) · We Are .NET · 1 upvotes · 0 comments
- [Your Signup Form Is Quietly Overworking Your Database](https://daily.dev/posts/your-signup-form-is-quietly-overworking-your-database-6tnjazdmf) · Medium · 0 upvotes · 0 comments
- [Build idempotent double opt-in signup](https://daily.dev/posts/build-idempotent-double-opt-in-signup-pqalhwsrt) · Flavio Copes · 1 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/cleaning-up-ghost-users-after-otp-registration-in-net-aukradz4n)
