Skip to content

fix: allow brand identity save without member profile#1787

Merged
bokelley merged 3 commits intomainfrom
bokelley/brand-save-no-profile
Mar 31, 2026
Merged

fix: allow brand identity save without member profile#1787
bokelley merged 3 commits intomainfrom
bokelley/brand-save-no-profile

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • The brand-identity PUT endpoint no longer requires a member profile to exist. Users can save their logo and brand color as soon as they have an org, before creating a full profile.
  • Falls back to org name for display name, and logo URL hostname for brand domain when no profile fields are available.
  • Fixes unclaimed hosted_brands rows not getting claimed on update (COALESCE on workos_organization_id).
  • Prevents domain squatting via logo URL by checking existing brand ownership before using logo hostname as brand domain.

Test plan

  • Authenticated user with no profile can save brand identity (logo URL + color)
  • Authenticated user with existing profile still works as before
  • Saving brand with logo URL on a domain already claimed by another org returns appropriate error
  • Updating an unclaimed hosted_brands row claims it for the current org
  • Brand domain derivation priority: profile.primary_brand_domain > profile.contact_website hostname > logo_url hostname

🤖 Generated with Claude Code

bokelley and others added 3 commits April 1, 2026 06:33
Users should be able to set up their brand (logo + color) before their
membership is fully established. Instead of returning a 404 when no
profile exists, auto-create a minimal non-public profile using the org
name and derive the brand domain from the logo URL hostname.

Includes: slug validation against reserved words, CDN hostname rejection
to prevent brand squatting, and concurrent-creation race handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ogo URL

- UPDATE path now sets workos_organization_id via COALESCE so unclaimed
  hosted_brands rows get claimed on first update
- Logo URL hostname fallback checks existing brand ownership before using
  the domain, preventing squatting on domains claimed by other orgs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 3bc3580 into main Mar 31, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant