Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(oauth-custom-providers): use host endpoint for listing providers (#44396)

Cemal Kılıç1f4cdc4471da
diff --git a/apps/studio/components/interfaces/Auth/CustomAuthProviders/CreateOrUpdateCustomProviderSheet.tsx b/apps/studio/components/interfaces/Auth/CustomAuthProviders/CreateOrUpdateCustomProviderSheet.tsx
index 794a29c1708..d04c2ca7207 100644
--- a/apps/studio/components/interfaces/Auth/CustomAuthProviders/CreateOrUpdateCustomProviderSheet.tsx
+++ b/apps/studio/components/interfaces/Auth/CustomAuthProviders/CreateOrUpdateCustomProviderSheet.tsx
@@ -114,7 +114,7 @@ export const CreateOrUpdateCustomProviderSheet = ({
}: CreateOrUpdateCustomProviderSheetProps) => {
const isEditMode = !!providerToEdit
const { ref: projectRef } = useParams()
- const { data: endpointData } = useProjectApiUrl({ projectRef })
+ const { hostEndpoint: endpointData } = useProjectApiUrl({ projectRef })
const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema),
defaultValues: initialValues,
diff --git a/apps/studio/data/oauth-custom-providers/oauth-custom-providers-query.ts b/apps/studio/data/oauth-custom-providers/oauth-custom-providers-query.ts
index dabea337f67..047619c8648 100644
--- a/apps/studio/data/oauth-custom-providers/oauth-custom-providers-query.ts
+++ b/apps/studio/data/oauth-custom-providers/oauth-custom-providers-query.ts
@@ -48,7 +48,7 @@ export const useOAuthCustomProvidersQuery = <TData = OAuthCustomProvidersData>(
...options
}: UseCustomQueryOptions<OAuthCustomProvidersData, OAuthCustomProvidersError, TData> = {}
) => {
- const { data: clientEndpoint } = useProjectApiUrl({ projectRef })
+ const { hostEndpoint: clientEndpoint } = useProjectApiUrl({ projectRef })
const { data: authConfig, isSuccess: isSuccessConfig } = useAuthConfigQuery({ projectRef })
const isOAuthCustomProvidersEnabled = !!authConfig?.CUSTOM_OAUTH_ENABLED