fix(oauth): fix login failures and add provider icon_url config

- Fix FIND_OAUTH_LINKED_USER_SQL missing allowed_providers_mode columns
- Fix TOUCH_OAUTH_LINK_SQL json/jsonb type mismatch in COALESCE
- Add icon_url field to OAuth provider config (DB, API, frontend)
- Fix admin OAuth test: accept 404 as reachable, use system proxy
This commit is contained in:
dalamudx
2026-05-17 21:22:20 +08:00
parent 3a23eaa572
commit 48deff15c4
18 changed files with 91 additions and 16 deletions

View File

@@ -9,6 +9,9 @@ export const OAUTH_ICONS: Record<string, string> = {
// Default icon when provider type is not found
const DEFAULT_ICON = OAUTH_ICONS.github
export function getOAuthIcon(providerType: string): string {
return OAUTH_ICONS[providerType.toLowerCase()] || DEFAULT_ICON
export function getOAuthIcon(providerType: string, iconUrl?: string | null): string {
const builtin = OAUTH_ICONS[providerType.toLowerCase()]
if (builtin) return builtin
if (iconUrl) return `<img src="${iconUrl}" alt="" style="width:100%;height:100%;object-fit:contain;" />`
return DEFAULT_ICON
}