diff --git a/packages/frontend/apps/ios/src/fetch.ts b/packages/frontend/apps/ios/src/fetch.ts
index bd4dc6e4fa63f..cb05ee7000c4f 100644
--- a/packages/frontend/apps/ios/src/fetch.ts
+++ b/packages/frontend/apps/ios/src/fetch.ts
@@ -3,7 +3,7 @@
*
* for support arraybuffer response type
*/
-import { FetchProvider } from '@affine/core/modules/cloud/provider/fetch';
+import { RawFetchProvider } from '@affine/core/modules/cloud/provider/fetch';
import { CapacitorHttp } from '@capacitor/core';
import type { Framework } from '@toeverything/infra';
@@ -121,7 +121,7 @@ function base64ToUint8Array(base64: string) {
return new Uint8Array(binaryArray);
}
export function configureFetchProvider(framework: Framework) {
- framework.override(FetchProvider, {
+ framework.override(RawFetchProvider, {
fetch: async (input, init) => {
const request = new Request(input, init);
const { method } = request;
diff --git a/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx b/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx
deleted file mode 100644
index 332a77ba48279..0000000000000
--- a/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useI18n } from '@affine/i18n';
-import type { FC } from 'react';
-
-import { Button } from '../../ui/button';
-import { AuthPageContainer } from './auth-page-container';
-
-export const ConfirmChangeEmail: FC<{
- onOpenAffine: () => void;
-}> = ({ onOpenAffine }) => {
- const t = useI18n();
-
- return (
-
-
-
- );
-};
diff --git a/packages/frontend/component/src/components/auth-components/email-verified-email.tsx b/packages/frontend/component/src/components/auth-components/email-verified-email.tsx
deleted file mode 100644
index b0adc8384441d..0000000000000
--- a/packages/frontend/component/src/components/auth-components/email-verified-email.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useI18n } from '@affine/i18n';
-import type { FC } from 'react';
-
-import { Button } from '../../ui/button';
-import { AuthPageContainer } from './auth-page-container';
-
-export const ConfirmVerifiedEmail: FC<{
- onOpenAffine: () => void;
-}> = ({ onOpenAffine }) => {
- const t = useI18n();
-
- return (
-
-
-
- );
-};
diff --git a/packages/frontend/component/src/components/auth-components/index.tsx b/packages/frontend/component/src/components/auth-components/index.tsx
index a179b3ca07ddb..a23d238dd7bc9 100644
--- a/packages/frontend/component/src/components/auth-components/index.tsx
+++ b/packages/frontend/component/src/components/auth-components/index.tsx
@@ -4,9 +4,7 @@ export * from './auth-page-container';
export * from './back-button';
export * from './change-email-page';
export * from './change-password-page';
-export * from './confirm-change-email';
export * from './count-down-render';
-export * from './email-verified-email';
export * from './modal';
export * from './modal-header';
export * from './onboarding-page';
diff --git a/packages/frontend/core/src/components/affine/auth/oauth.tsx b/packages/frontend/core/src/components/affine/auth/oauth.tsx
index 3f8b65cdbb984..f6d4ddfb4b47a 100644
--- a/packages/frontend/core/src/components/affine/auth/oauth.tsx
+++ b/packages/frontend/core/src/components/affine/auth/oauth.tsx
@@ -1,13 +1,12 @@
import { Skeleton } from '@affine/component';
import { Button } from '@affine/component/ui/button';
+import { ServerService } from '@affine/core/modules/cloud';
import { UrlService } from '@affine/core/modules/url';
import { OAuthProviderType } from '@affine/graphql';
import { GithubIcon, GoogleDuotoneIcon } from '@blocksuite/icons/rc';
import { useLiveData, useService } from '@toeverything/infra';
import { type ReactElement, useCallback } from 'react';
-import { ServerConfigService } from '../../../modules/cloud';
-
const OAuthProviderMap: Record<
OAuthProviderType,
{
@@ -29,11 +28,11 @@ const OAuthProviderMap: Record<
};
export function OAuth({ redirectUrl }: { redirectUrl?: string }) {
- const serverConfig = useService(ServerConfigService).serverConfig;
+ const serverService = useService(ServerService);
const urlService = useService(UrlService);
- const oauth = useLiveData(serverConfig.features$.map(r => r?.oauth));
+ const oauth = useLiveData(serverService.server.features$.map(r => r?.oauth));
const oauthProviders = useLiveData(
- serverConfig.config$.map(r => r?.oauthProviders)
+ serverService.server.config$.map(r => r?.oauthProviders)
);
const scheme = urlService.getClientScheme();
@@ -65,6 +64,7 @@ function OAuthProvider({
scheme?: string;
popupWindow: (url: string) => void;
}) {
+ const serverService = useService(ServerService);
const { icon } = OAuthProviderMap[provider];
const onClick = useCallback(() => {
@@ -84,10 +84,10 @@ function OAuthProvider({
// if (BUILD_CONFIG.isAndroid) {}
const oauthUrl =
- BUILD_CONFIG.serverUrlPrefix + `/oauth/login?${params.toString()}`;
+ serverService.server.baseUrl + `/oauth/login?${params.toString()}`;
popupWindow(oauthUrl);
- }, [popupWindow, provider, redirectUrl, scheme]);
+ }, [popupWindow, provider, redirectUrl, scheme, serverService]);
return (