diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts index 900a3dec2..02d7d22bd 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts @@ -393,9 +393,20 @@ export class SignInUpService { } } - const logo = isWorkEmail(email) - ? `${TWENTY_ICONS_BASE_URL}/${getDomainNameByEmail(email)}` - : undefined; + const logoUrl = `${TWENTY_ICONS_BASE_URL}/${getDomainNameByEmail(email)}`; + const isLogoUrlValid = async () => { + try { + return ( + (await this.httpService.axiosRef.get(logoUrl, { timeout: 600 })) + .status === 200 + ); + } catch { + return false; + } + }; + + const logo = + isWorkEmail(email) && (await isLogoUrlValid()) ? logoUrl : undefined; const workspaceToCreate = this.workspaceRepository.create({ subdomain: await this.domainManagerService.generateSubdomain(),