Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): only sign out previous account in web oauth (#8290)

forehaloed7fb3fb71b9
diff --git a/packages/frontend/core/src/desktop/pages/auth/oauth-login.tsx b/packages/frontend/core/src/desktop/pages/auth/oauth-login.tsx
index ed4ff242d0..179ca4f677 100644
--- a/packages/frontend/core/src/desktop/pages/auth/oauth-login.tsx
+++ b/packages/frontend/core/src/desktop/pages/auth/oauth-login.tsx
@@ -34,8 +34,10 @@ export const loader: LoaderFunction = async ({ request }) => {
const client = searchParams.get('client') ?? 'web';
const redirectUri = searchParams.get('redirect_uri');
- // sign out first
- await fetch('/api/auth/sign-out');
+ // sign out first, web only
+ if (client === 'web') {
+ await fetch('/api/auth/sign-out');
+ }
const paramsParseResult = oauthParameters.safeParse({
provider,