Unverified accounts cleanup
Purges sign-up accounts that never confirmed their email address.
How it works
When someone signs up, an account is created in an “unverified” state and an email verification challenge is sent. The challenge expires after 24 hours. This job removes accounts whose verification window has lapsed so that the same email can be re-used for a fresh sign-up.
- Finds candidates — unverified accounts older than the grace period
- Deletes — each candidate account is deleted, including any related auth challenges
The cleanup is global, not per-workspace. The job is pinned to the system workspace: scheduling iterates every workspace but only the system workspace produces an actual cleanup run.
When it runs
The job runs automatically and only triggers when there is at least one candidate to purge.
Parameters
| Parameter | Default | Description |
|---|---|---|
| Grace Period (hours) | 24 | Hours after account creation before an unverified account becomes eligible for deletion. Values below 24 are clamped to 24 to protect accounts whose verification challenge is still valid |
| Dry Run | false | When enabled, report what would be deleted without deleting anything |
Job results
| Metric | Description |
|---|---|
candidates | Number of unverified accounts past the grace period |
deleted | Number of accounts actually deleted (0 in dry run) |
grace_period_hours | Effective grace period after clamping |
dry_run | Whether this was a dry run |
A run with no candidates returns skipped: true, reason: "no candidates".
Troubleshooting
| Issue | Solution |
|---|---|
| Account not deleted | Confirm the grace period has passed. The clamp prevents shorter windows from running |
| Email still rejected for sign-up after cleanup | Run a dry run to confirm the candidate set, then a real run. Verify no other workspace still has a user referencing that account |