Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(sso): give a pending domain 7 days to verify instead of 3 hours (#16844)

lina-alomari7b677a2f9e6a
diff --git a/docs/admin-guide/guides/sso.mdx b/docs/admin-guide/guides/sso.mdx
index 714c1cf650d..12160913b61 100644
--- a/docs/admin-guide/guides/sso.mdx
+++ b/docs/admin-guide/guides/sso.mdx
@@ -40,11 +40,11 @@ Single sign-on needs a verified company domain (for example `acme.com`).
Copy the TXT record's **Name** and **Value** and add them at your DNS provider.
</Step>
<Step title="Verify DNS">
- Click **Verify DNS**. DNS changes can take a few minutes to show up, so try again if the record isn't found yet. Verify within 3 hours, or the domain is dropped and you start again with a new record.
+ Click **Verify DNS**. DNS changes can take a few minutes to show up, so try again if the record isn't found yet. Verify within 7 days, or the domain is dropped and you start again with a new record.
</Step>
</Steps>
-While a domain is being verified it shows as **Verifying**. Its menu lets you **Continue verifying** or **Cancel verification**. Once verified, use **View DNS record** to see the record again.
+While a domain is being verified it shows as **Verifying**, with **Waiting for DNS · day N of 7** under it. Its menu lets you **Continue verifying** or **Cancel verification**. Once verified, use **View DNS record** to see the record again.
You can also verify the domain from the first step of the SAML setup, described below.
diff --git a/packages/server/api/src/app/ee/authentication/saml-authn/authn-sso-saml-service.ts b/packages/server/api/src/app/ee/authentication/saml-authn/authn-sso-saml-service.ts
index 85830be43a7..c8c9065e512 100644
--- a/packages/server/api/src/app/ee/authentication/saml-authn/authn-sso-saml-service.ts
+++ b/packages/server/api/src/app/ee/authentication/saml-authn/authn-sso-saml-service.ts
@@ -147,7 +147,7 @@ export const authnSsoSamlService = (log: FastifyBaseLogger) => {
.set({ ssoDomain: null, ssoDomainVerification: null })
.where('"ssoDomain" IS NOT NULL')
.andWhere('"ssoDomainVerification"->>\'status\' = :status', { status: SsoDomainVerificationStatus.PENDING_VERIFICATION })
- .andWhere(`("ssoDomainVerification"->>'createdAt')::timestamptz < NOW() - INTERVAL '${PENDING_DOMAIN_TTL_HOURS} hour'`)
+ .andWhere(`("ssoDomainVerification"->>'createdAt')::timestamptz < NOW() - INTERVAL '${PENDING_DOMAIN_TTL_DAYS} day'`)
.execute()
const affected = result.affected ?? 0
if (affected > 0) {
@@ -157,7 +157,7 @@ export const authnSsoSamlService = (log: FastifyBaseLogger) => {
}
}
-const PENDING_DOMAIN_TTL_HOURS = 3 // if sso domain was not verified in this number of hours it will be set to null
+const PENDING_DOMAIN_TTL_DAYS = 7
function computeNextVerification({ nextDomain, currentDomain, currentVerification }: { nextDomain: string | null, currentDomain: string | null, currentVerification: SsoDomainVerification | null }): SsoDomainVerification | null {
if (isNil(nextDomain)) {
diff --git a/packages/server/api/test/integration/ee/sso-domain/sso-domain.test.ts b/packages/server/api/test/integration/ee/sso-domain/sso-domain.test.ts
index 21bdabb7c8c..464ac8db2fd 100644
--- a/packages/server/api/test/integration/ee/sso-domain/sso-domain.test.ts
+++ b/packages/server/api/test/integration/ee/sso-domain/sso-domain.test.ts
@@ -2,6 +2,7 @@ import { SsoDomainVerification, SsoDomainVerificationRecordType, SsoDomainVerifi
import { FastifyInstance } from 'fastify'
import { StatusCodes } from 'http-status-codes'
import { databaseConnection } from '../../../../src/app/database/database-connection'
+import { authnSsoSamlService } from '../../../../src/app/ee/authentication/saml-authn/authn-sso-saml-service'
import { createTestContext } from '../../../helpers/test-context'
import { setupTestEnvironment, teardownTestEnvironment } from '../../../helpers/test-setup'
@@ -139,6 +140,39 @@ describe('SSO domain API', () => {
expect(platform.ssoDomain).toBeNull()
})
})
+
+ describe('expirePendingSsoDomains', () => {
+ it('keeps a pending domain for 7 days, then drops it', async () => {
+ const sixDays = await createTestContext(app!, {
+ plan: { ssoEnabled: true },
+ platform: {
+ ssoDomain: 'six-days.example.com',
+ ssoDomainVerification: { ...pending('six-days.example.com'), createdAt: daysAgo(6) },
+ },
+ })
+ const eightDays = await createTestContext(app!, {
+ plan: { ssoEnabled: true },
+ platform: {
+ ssoDomain: 'eight-days.example.com',
+ ssoDomainVerification: { ...pending('eight-days.example.com'), createdAt: daysAgo(8) },
+ },
+ })
+ const verifiedLongAgo = await createTestContext(app!, {
+ plan: { ssoEnabled: true },
+ platform: {
+ ssoDomain: 'verified-long-ago.example.com',
+ ssoDomainVerification: { ...verified('verified-long-ago.example.com'), createdAt: daysAgo(30) },
+ },
+ })
+
+ await authnSsoSamlService(app!.log).expirePendingSsoDomains()
+
+ expect((await findPlatform(sixDays.platform.id)).ssoDomain).toBe('six-days.example.com')
+ expect((await findPlatform(eightDays.platform.id)).ssoDomain).toBeNull()
+ expect((await findPlatform(eightDays.platform.id)).ssoDomainVerification).toBeNull()
+ expect((await findPlatform(verifiedLongAgo.platform.id)).ssoDomain).toBe('verified-long-ago.example.com')
+ })
+ })
})
async function findPlatform(id: string): Promise<PlatformSsoRow> {
@@ -167,6 +201,10 @@ function pending(domain: string): SsoDomainVerification {
}
}
+function daysAgo(days: number): string {
+ return new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString()
+}
+
const SSO_DOMAIN = '/v1/authn/saml/sso-domain'
const SAML = {
diff --git a/packages/web/public/locales/de/translation.json b/packages/web/public/locales/de/translation.json
index 279c01feb74..48bbcff7b80 100644
--- a/packages/web/public/locales/de/translation.json
+++ b/packages/web/public/locales/de/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "DNS überprüfen",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Verifiziert",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/en/translation.json b/packages/web/public/locales/en/translation.json
index f2367aebf7f..0b0ee53b081 100644
--- a/packages/web/public/locales/en/translation.json
+++ b/packages/web/public/locales/en/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Verify DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Verified",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/es/translation.json b/packages/web/public/locales/es/translation.json
index 66df5c7eacb..b5f9dad7234 100644
--- a/packages/web/public/locales/es/translation.json
+++ b/packages/web/public/locales/es/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Verificar DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Verificado",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/fr/translation.json b/packages/web/public/locales/fr/translation.json
index 113fe081aac..c24733ca97a 100644
--- a/packages/web/public/locales/fr/translation.json
+++ b/packages/web/public/locales/fr/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Vérifier le DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Vérifié",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/ja/translation.json b/packages/web/public/locales/ja/translation.json
index c524ddfe1c0..0af40473fbf 100644
--- a/packages/web/public/locales/ja/translation.json
+++ b/packages/web/public/locales/ja/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "DNSを確認",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "確認済み",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/nl/translation.json b/packages/web/public/locales/nl/translation.json
index 30edd55ffd1..54c0eedd744 100644
--- a/packages/web/public/locales/nl/translation.json
+++ b/packages/web/public/locales/nl/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Controleer DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Geverifieerd",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/pt/translation.json b/packages/web/public/locales/pt/translation.json
index 55117db798d..278d0264426 100644
--- a/packages/web/public/locales/pt/translation.json
+++ b/packages/web/public/locales/pt/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Verificar DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "Verificada",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/public/locales/zh-TW/translation.json b/packages/web/public/locales/zh-TW/translation.json
index 30f0577d06c..0afca1dbb13 100644
--- a/packages/web/public/locales/zh-TW/translation.json
+++ b/packages/web/public/locales/zh-TW/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "",
"People at {domain} can no longer sign in with email and password.": "",
"Verify {domain}": "",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "",
"Verify DNS": "",
"Your domain is verified. Next, connect your identity provider.": "",
"Verified": "",
@@ -1931,7 +1931,7 @@
"No domain verified": "",
"Verify the domain your people sign in with.": "",
"Verify domain": "",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "",
+ "Waiting for DNS · day {day} of 7": "",
"Verifying": "",
"Domain actions": "",
"View DNS record": "",
diff --git a/packages/web/public/locales/zh/translation.json b/packages/web/public/locales/zh/translation.json
index 410229a324f..bf1dd57d72c 100644
--- a/packages/web/public/locales/zh/translation.json
+++ b/packages/web/public/locales/zh/translation.json
@@ -1923,7 +1923,7 @@
"People at {domain} can no longer join or sign in with email and password.": "People at {domain} can no longer join or sign in with email and password.",
"People at {domain} can no longer sign in with email and password.": "People at {domain} can no longer sign in with email and password.",
"Verify {domain}": "Verify {domain}",
- "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.",
+ "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.": "Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.",
"Verify DNS": "Verify DNS",
"Your domain is verified. Next, connect your identity provider.": "Your domain is verified. Next, connect your identity provider.",
"Verified": "已验证",
@@ -1931,7 +1931,7 @@
"No domain verified": "No domain verified",
"Verify the domain your people sign in with.": "Verify the domain your people sign in with.",
"Verify domain": "Verify domain",
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.": "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
+ "Waiting for DNS · day {day} of 7": "Waiting for DNS · day {day} of 7",
"Verifying": "Verifying",
"Domain actions": "Domain actions",
"View DNS record": "View DNS record",
diff --git a/packages/web/src/app/routes/platform/security/sso/domain-verification.tsx b/packages/web/src/app/routes/platform/security/sso/domain-verification.tsx
index 350a2de2a56..56d646f9cc7 100644
--- a/packages/web/src/app/routes/platform/security/sso/domain-verification.tsx
+++ b/packages/web/src/app/routes/platform/security/sso/domain-verification.tsx
@@ -167,7 +167,7 @@ const PendingDomain = ({
</h3>
<p className="text-sm text-gray-11">
{t(
- 'Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.',
+ 'Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.',
)}
</p>
</div>
diff --git a/packages/web/src/app/routes/platform/security/sso/domains-section.tsx b/packages/web/src/app/routes/platform/security/sso/domains-section.tsx
index 2c9f09ceb7b..73cf2ca0a54 100644
--- a/packages/web/src/app/routes/platform/security/sso/domains-section.tsx
+++ b/packages/web/src/app/routes/platform/security/sso/domains-section.tsx
@@ -3,6 +3,7 @@ import {
SsoDomainVerification,
SsoDomainVerificationStatus,
} from '@activepieces/shared';
+import dayjs from 'dayjs';
import { t } from 'i18next';
import { FileText, MoreHorizontal, ShieldCheck, Trash } from 'lucide-react';
import { useState } from 'react';
@@ -101,17 +102,14 @@ const DomainRow = ({
useSignInMethods(platform).isOnlyWorkingMethod('saml');
const [dnsRecordOpen, setDnsRecordOpen] = useState(false);
const verified = verification.status === SsoDomainVerificationStatus.VERIFIED;
+ const day = Math.min(7, dayjs().diff(verification.createdAt, 'day') + 1);
return (
<SettingsRow
media={<DomainStatusIcon status={verified ? 'verified' : 'pending'} />}
title={domain}
description={
- verified
- ? undefined
- : t(
- "Verification in progress. Add the TXT record within 3 hours or it's dropped.",
- )
+ verified ? undefined : t('Waiting for DNS · day {day} of 7', { day })
}
>
<StatusDot
diff --git a/packages/web/src/app/routes/platform/security/sso/verify-domain-dialog.tsx b/packages/web/src/app/routes/platform/security/sso/verify-domain-dialog.tsx
index 4ea38347c4b..245e43ff6ec 100644
--- a/packages/web/src/app/routes/platform/security/sso/verify-domain-dialog.tsx
+++ b/packages/web/src/app/routes/platform/security/sso/verify-domain-dialog.tsx
@@ -45,7 +45,7 @@ export const VerifyDomainDialog = ({
<DialogDescription>
{pending
? t(
- 'Add this TXT record at your DNS provider, then verify. Verify within 3 hours or the domain is dropped.',
+ 'Add this TXT record at your DNS provider, then verify. Verify within 7 days or the domain is dropped.',
)
: t(
'Prove your company owns its email domain with a DNS record.',
diff --git a/packages/web/test/app/routes/platform/security/sso/sso-page.test.tsx b/packages/web/test/app/routes/platform/security/sso/sso-page.test.tsx
index 3ac04be89dc..35257d9f9eb 100644
--- a/packages/web/test/app/routes/platform/security/sso/sso-page.test.tsx
+++ b/packages/web/test/app/routes/platform/security/sso/sso-page.test.tsx
@@ -13,7 +13,7 @@ import {
} from '@testing-library/react';
import * as React from 'react';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
-import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { beforeEach, describe, expect, it, onTestFinished, vi } from 'vitest';
const {
toastMock,
@@ -286,6 +286,37 @@ describe('SSOPage', () => {
);
});
+ it('shows which day of the 7-day window a pending domain is on', () => {
+ vi.useFakeTimers({ toFake: ['Date'] });
+ onTestFinished(() => {
+ vi.useRealTimers();
+ });
+ vi.setSystemTime(new Date('2026-10-16T12:00:00.000Z'));
+ setPlatform({
+ ssoDomain: 'acme.com',
+ ssoDomainVerification: pendingVerification,
+ });
+ mount();
+
+ expect(screen.getByText('Waiting for DNS · day 3 of 7')).toBeDefined();
+ });
+
+ it('stays on day 7 once the window has passed but the domain is not dropped yet', () => {
+ vi.useFakeTimers({ toFake: ['Date'] });
+ onTestFinished(() => {
+ vi.useRealTimers();
+ });
+ vi.setSystemTime(new Date('2026-10-21T00:30:00.000Z'));
+ setPlatform({
+ ssoDomain: 'acme.com',
+ ssoDomainVerification: pendingVerification,
+ });
+ mount();
+
+ expect(screen.getByText('Waiting for DNS · day 7 of 7')).toBeDefined();
+ expect(screen.queryByText('Waiting for DNS · day 8 of 7')).toBeNull();
+ });
+
it('shows a verified domain without the DNS check', () => {
setPlatform({
ssoDomain: 'acme.com',