diff --git a/packages/sanity/src/core/store/_legacy/authStore/createLoginComponent.tsx b/packages/sanity/src/core/store/_legacy/authStore/createLoginComponent.tsx
index dc681784bcd..a154b141507 100644
--- a/packages/sanity/src/core/store/_legacy/authStore/createLoginComponent.tsx
+++ b/packages/sanity/src/core/store/_legacy/authStore/createLoginComponent.tsx
@@ -4,7 +4,7 @@ import React, {useEffect, useState} from 'react'
import type {Observable} from 'rxjs'
import type {AuthConfig} from '../../../config'
import {createHookFromObservableFactory} from '../../../util'
-import {providerLogos} from './providerLogos'
+import {CustomLogo, providerLogos} from './providerLogos'
import type {LoginComponentProps} from './types'
interface GetProvidersOptions extends AuthConfig {
@@ -156,7 +156,7 @@ export function createLoginComponent({
// eslint-disable-next-line react/no-array-index-key
key={`${provider.url}_${index}`}
as="a"
- icon={providerLogos[provider.name]}
+ icon={providerLogos[provider.name] || }
href={createHrefForProvider({
loginMethod,
projectId,
diff --git a/packages/sanity/src/core/store/_legacy/authStore/providerLogos.tsx b/packages/sanity/src/core/store/_legacy/authStore/providerLogos.tsx
index e247e1a2b34..5f6cb95f0db 100644
--- a/packages/sanity/src/core/store/_legacy/authStore/providerLogos.tsx
+++ b/packages/sanity/src/core/store/_legacy/authStore/providerLogos.tsx
@@ -11,6 +11,12 @@ const GithubRoot = styled.svg(({theme}: {theme: Theme}) => {
`
})
+const CustomImage = styled.img`
+ height: 19px;
+ width: 19px;
+ object-fit: contain;
+`
+
const GithubLogo = () => (
(
)
-function CustomLogo(props: {provider: AuthProvider}) {
+export function CustomLogo(props: {provider: AuthProvider}) {
const {provider} = props
- return (
- provider.logo ? : undefined
- ) as any
+ return provider.logo ? (
+
+ ) : undefined
}
export const providerLogos: Record> = {
google: GoogleLogo,
github: GithubLogo,
- custom: CustomLogo,
// sanity: () => ,
}