Skip to content

Conversation

@lancepioch
Copy link
Member

When an invalid SVG icon name is configured for a generic-oidc provider, the login page crashes with a SvgNotFound exception making the dashboard inaccessible.

Fixes #2210

When an invalid SVG icon name is configured for a generic-oidc provider,
the login page crashes with a SvgNotFound exception making the dashboard
inaccessible. Validate the icon via the injected IconFactory before
passing it to Filament and fall back to null if not found.

Fixes #2210
@lancepioch lancepioch self-assigned this Feb 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Added IconFactory dependency injection and exception handling to resolve OAuth provider icons, preventing crashes when invalid SVG icons are configured. Both pages now gracefully handle missing icons with fallbacks.

Changes

Cohort / File(s) Summary
OAuth Icon Resolution
app/Filament/Admin/Pages/Settings.php, app/Filament/Pages/Auth/Login.php
Added IconFactory dependency injection via boot() method parameter and stored as protected property. Integrated exception handling for SvgNotFound to resolve OAuth provider icons with fallbacks, preventing crashes from invalid icon configurations.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: gracefully handling invalid SVG icons in the generic-oidc provider to prevent crashes.
Description check ✅ Passed The description clearly explains the problem (invalid SVG icon causes SvgNotFound exception), the impact (dashboard becomes inaccessible), and references the fixed issue.
Linked Issues check ✅ Passed The PR successfully addresses issue #2210 by injecting IconFactory, catching SvgNotFound exceptions, and providing null fallback for invalid icons, preventing login page crashes.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the SvgNotFound exception in generic-oidc OAuth provider icon handling across Settings and Login pages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
app/Filament/Admin/Pages/Settings.php (1)

573-584: LGTM — consistent icon validation with appropriate fallback.

The TablerIcon::BrandOauth fallback is a good choice here since settings sections need a visible icon.

One minor note: the icon-resolution try/catch block is duplicated verbatim in Login.php (lines 95–102). Consider extracting it into a small helper (e.g., on OAuthSchemaInterface or a shared trait/utility) to keep this DRY if more consumers appear.

,

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Latest version does not handle exceptions on fetching svg icons

1 participant