mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 09:50:21 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user