Skip to content

fix: add identity provider icon fallback#3008

Merged
HarshMN2345 merged 1 commit intomainfrom
fix-identity-icon-fallback
Apr 28, 2026
Merged

fix: add identity provider icon fallback#3008
HarshMN2345 merged 1 commit intomainfrom
fix-identity-icon-fallback

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@HarshMN2345 HarshMN2345 requested a review from Meldiron April 28, 2026 09:21
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR fixes a crash/broken render in the user identities table when an OAuth provider ID is not found in the oAuthProviders map. The old code accessed provider.icon and provider.name directly on a potentially undefined object; the new getProviderMeta helper applies optional chaining and falls back to the raw providerId string as the display name, while the icon avatar is conditionally rendered only when an icon is known.

Confidence Score: 5/5

Safe to merge — targeted, minimal fix with no new logic paths or regressions introduced.

The change is small and well-scoped: it guards against a undefined dereference on an unknown provider ID, adds a clean fallback, and correctly uses conditional rendering. No security concerns, no breaking changes, and the oAuthProviders object already covers all known providers with non-optional icon fields.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/auth/user-[user]/identities/table.svelte Adds a getProviderMeta helper to safely handle unknown OAuth provider IDs, conditionally rendering the icon only when it exists and falling back to the raw provider ID as the display name.

Reviews (1): Last reviewed commit: "fix: add identity provider icon fallback" | Re-trigger Greptile

@HarshMN2345 HarshMN2345 merged commit 8bfaea3 into main Apr 28, 2026
4 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-identity-icon-fallback branch April 28, 2026 09:33
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.

2 participants