langgenius/dify · error · AccountRegisterError
This email account has been deleted within the past 30 days
Error message
This email account has been deleted within the past 30 days and is temporarily unavailable for new account registration
What it means
Raised as AccountRegisterError (a service-layer exception, not an HTTP exception) at oauth.py:308 during OAuth first-time registration when registration is disabled (FeatureService.get_system_features().is_allow_register is False), the deployment is CLOUD, and BillingService.is_email_in_freeze(normalized_email) is True. The OAuth callback catches it at oauth.py:246 and redirects to /signin?message=<description>. The description is the explicit freeze string with correct spacing (unlike the typo'd AccountInFreezeError description).
Source
Thrown at api/controllers/console/auth/oauth.py:308
account = _get_account_by_openid_or_email(provider, user_info)
oauth_new_user = False
if account:
tenants = TenantService.get_join_tenants(account, session=db.session())
if not tenants:
if not FeatureService.is_workspace_creation_allowed():
raise WorkSpaceNotAllowedCreateError()
else:
TenantService.create_owner_tenant(account, session=db.session())
if not account:
normalized_email = user_info.email.lower()
oauth_new_user = True
if not FeatureService.get_system_features().is_allow_register:
if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(
normalized_email
):
raise AccountRegisterError(
description=(
"This email account has been deleted within the past "
"30 days and is temporarily unavailable for new account registration"
)
)
raise AccountRegisterError(description=("Invalid email or password"))
account_name = user_info.name or "Dify"
interface_language = _preferred_interface_language(language)
account = RegisterService.register(
email=normalized_email,
name=account_name,
password=None,
open_id=user_info.id,
provider=provider,
language=interface_language,
timezone=timezone,
session=db.session(),
)View on GitHub (pinned to ef8544b173)
Solutions
- Wait for the 30-day freeze window to pass so BillingService.is_email_in_freeze returns False.
- Ask Dify Cloud support to remove the email from the billing freeze list.
- If registration should be permitted, enable FeatureService.get_system_features().is_allow_register so the freeze check is skipped entirely.
- Use a different email address for the OAuth identity to avoid the frozen one.
Defensive patterns
Strategy: validation
Validate before calling
// Detect the freeze redirect in the OAuth callback and guide the user.
const msg = new URL(window.location.href).searchParams.get('message') || '';
if (msg.includes('deleted within the past')) { showFreezeNotice(); } Try / catch
try {
await completeOAuthCallback();
} catch (e) {
if (/deleted within the past/i.test(String(e.message || e))) {
showWait30DaysNotice();
} else { throw e; }
} Prevention
- On Cloud with registration disabled, expect freeze blocks for re-registering deleted emails.
- Pre-provision deleted-returning users via admin tools if they must regain access.
- Tell support the exact email when requesting freeze removal.
When it happens
Trigger: OAuth callback for a brand-new identity (no account matched by openid/email) on Cloud edition with registration disabled, where the normalized email was deleted within 30 days. The if-branch at oauth.py:304-313 fires.
Common situations: Cloud customer with self-registration turned off; a previously-deleted user attempts SSO login expecting it to work, but the freeze window blocks re-creation. Common after org-wide account cleanup.
Related errors
- account_in_freeze
- limit_exceeded
- Invalid email or password
- Invalid partner_key
- Invalid partner information
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/197e29701f806599.
Report an issue: GitHub.