Skip to content

fix: allow brand identity save without member profile#1779

Closed
bokelley wants to merge 1 commit intomainfrom
bokelley/fix-save-button
Closed

fix: allow brand identity save without member profile#1779
bokelley wants to merge 1 commit intomainfrom
bokelley/fix-save-button

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented Mar 31, 2026

Summary

  • The PUT /brand-identity endpoint required a member profile to exist, blocking users from setting up their brand before their membership is established
  • Now the endpoint works without a profile — the brand is tied to the org directly via hosted_brands.workos_organization_id
  • When no profile exists: display name comes from the org table, brand domain is derived from the logo URL hostname
  • Normalizes brand domain to lowercase to prevent case-sensitivity bypass on the ownership check

Test plan

  • As org with no profile, save brand identity with a logo URL on your own domain — should succeed
  • As org with existing profile, save brand identity — should work as before
  • Try saving with only brand color (no logo, no profile) — should get error asking for logo URL
  • Verify ownership check: org A claims a domain, org B tries to claim same domain — should get 403

🤖 Generated with Claude Code

@bokelley bokelley force-pushed the bokelley/fix-save-button branch from 5943cb9 to a5ff202 Compare March 31, 2026 21:25
@bokelley bokelley changed the title fix: hide brand identity section during profile creation fix: auto-create member profile when saving brand identity Mar 31, 2026
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>
@bokelley bokelley force-pushed the bokelley/fix-save-button branch from a5ff202 to e6dd82c Compare March 31, 2026 21:34
@bokelley bokelley changed the title fix: auto-create member profile when saving brand identity fix: allow brand identity save without member profile Mar 31, 2026
@bokelley
Copy link
Copy Markdown
Contributor Author

bokelley commented Apr 1, 2026

Superseded by #1787 which merged the same fix.

@bokelley bokelley closed this Apr 1, 2026
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