Skip to content

Conversation

@stuburger
Copy link
Contributor

Summary

This PR updates the default value for the registration_url in the seller invitation schema to use the buildHostAddress utility. Previously, the invitation link always pointed to localhost, regardless of the deployment environment. With this change, the invitation link will correctly use the vendor panel domain as configured in environment variables or fallback defaults, ensuring that invited sellers receive a valid registration link for the appropriate environment.

Key changes

Replaced hardcoded localhost registration_url with dynamic buildHostAddress(Hosts.VENDOR_PANEL, '/register').
Ensures invitation links are environment-aware and point to the correct vendor panel domain.

Alternative considered

A key advantage of this approach is that the backend maintains intrinsic knowledge of where invitation links should direct users, ensuring consistency and environment-awareness across all entry points. Supplying the registration_url directly in the inviteSeller call within the page component was also considered, but this would duplicate URL construction logic and increase the risk of inconsistencies. Centralising the default in the schema feels more robust and maintainable.

…ault, ensuring correct vendor panel domain in invitation links
@stuburger
Copy link
Contributor Author

I'm not sure if this is an appropriate solution as I'd assume there should be some kind of invitation id appended to the /register url.

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