fix: use team slug instead of ULID for tenant URL resolution#127
Merged
ManukMinasyan merged 1 commit intomainfrom Feb 16, 2026
Merged
fix: use team slug instead of ULID for tenant URL resolution#127ManukMinasyan merged 1 commit intomainfrom
ManukMinasyan merged 1 commit intomainfrom
Conversation
Login redirect was building URLs with the team's ULID primary key instead of the slug attribute, causing 404s after authentication. Also fix developer login link redirect to use app panel URL.
There was a problem hiding this comment.
Pull request overview
This pull request fixes a critical bug in tenant URL resolution where the app was using ULID primary keys instead of team slugs for routing, causing 404 errors after login. The fix ensures that Filament's tenant routing correctly uses the configured slugAttribute: 'slug' by passing the Team model instead of its ULID key.
Changes:
- Fixed
LoginResponseto pass the Team model (not ULID) to Filament's URL generation for proper slug resolution - Updated developer login link to redirect to the app panel instead of the marketing homepage
- Corrected test assertion to validate slug-based URLs instead of ULID-based URLs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/Http/Responses/LoginResponse.php | Pass Team model instead of ULID to enable Filament slug resolution |
| app/Providers/Filament/AppPanelProvider.php | Fix developer login redirect URL to point to app panel |
| tests/Feature/Auth/AuthenticationTest.php | Update test to assert slug-based URL instead of ULID-based URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
->getKey()(ULID) when building the post-login redirect URL, so Filament resolves theslugattribute correctlyredirect-urlchanged fromurl('/')(marketing homepage) tourl()->getAppUrl()(app panel)$team->sluginstead of$team->idRoot cause
The app panel is configured with
slugAttribute: 'slug'for tenant routing, butLoginResponsewas passing$user->currentTeam->getKey()(the ULID primary key) as the tenant parameter. Filament generated a URL with the ULID, then tried to resolve it against theslugcolumn — resulting in a 404.Test plan
/app/{team-slug}/companies