{"record":{"id":"197e29701f806599","repo":"langgenius/dify","slug":"this-email-account-has-been-deleted-within-the-pas","errorCode":null,"errorMessage":"This email account has been deleted within the past 30 days and is temporarily unavailable for new account registration","messagePattern":"This email account has been deleted within the past 30 days and is temporarily unavailable for new account registration","errorType":"exception","errorClass":"AccountRegisterError","httpStatus":null,"severity":"error","filePath":"api/controllers/console/auth/oauth.py","lineNumber":308,"sourceCode":"    account = _get_account_by_openid_or_email(provider, user_info)\n    oauth_new_user = False\n\n    if account:\n        tenants = TenantService.get_join_tenants(account, session=db.session())\n        if not tenants:\n            if not FeatureService.is_workspace_creation_allowed():\n                raise WorkSpaceNotAllowedCreateError()\n            else:\n                TenantService.create_owner_tenant(account, session=db.session())\n\n    if not account:\n        normalized_email = user_info.email.lower()\n        oauth_new_user = True\n        if not FeatureService.get_system_features().is_allow_register:\n            if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(\n                normalized_email\n            ):\n                raise AccountRegisterError(\n                    description=(\n                        \"This email account has been deleted within the past \"\n                        \"30 days and is temporarily unavailable for new account registration\"\n                    )\n                )\n            raise AccountRegisterError(description=(\"Invalid email or password\"))\n        account_name = user_info.name or \"Dify\"\n        interface_language = _preferred_interface_language(language)\n        account = RegisterService.register(\n            email=normalized_email,\n            name=account_name,\n            password=None,\n            open_id=user_info.id,\n            provider=provider,\n            language=interface_language,\n            timezone=timezone,\n            session=db.session(),\n        )","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/auth/oauth.py#L290-L326","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Detect the freeze redirect in the OAuth callback and guide the user.\nconst msg = new URL(window.location.href).searchParams.get('message') || '';\nif (msg.includes('deleted within the past')) { showFreezeNotice(); }","typeGuard":null,"tryCatchPattern":"try {\n  await completeOAuthCallback();\n} catch (e) {\n  if (/deleted within the past/i.test(String(e.message || e))) {\n    showWait30DaysNotice();\n  } else { throw e; }\n}","preventionTips":["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."],"tags":["oauth","registration","billing","cloud-edition","account-freeze"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}