mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix: signout account when logging through oauth signin via desktop (#4321)
This commit is contained in:
@@ -54,7 +54,7 @@ export const signInCloud: typeof signIn = async (provider, ...rest) => {
|
||||
`${
|
||||
runtimeConfig.serverUrlPrefix
|
||||
}/desktop-signin?provider=google&callback_url=${buildCallbackUrl(
|
||||
'/open-app/oauth-jwt'
|
||||
'/open-app/signin-redirect'
|
||||
)}`,
|
||||
'_target'
|
||||
);
|
||||
@@ -63,7 +63,9 @@ export const signInCloud: typeof signIn = async (provider, ...rest) => {
|
||||
const [options, ...tail] = rest;
|
||||
const callbackUrl =
|
||||
runtimeConfig.serverUrlPrefix +
|
||||
(provider === 'email' ? '/open-app/oauth-jwt' : location.pathname);
|
||||
(provider === 'email'
|
||||
? '/open-app/signin-redirect'
|
||||
: location.pathname);
|
||||
return signIn(
|
||||
provider,
|
||||
{
|
||||
@@ -85,8 +87,8 @@ export const signInCloud: typeof signIn = async (provider, ...rest) => {
|
||||
export const signOutCloud: typeof signOut = async options => {
|
||||
const traceParams = genTraceParams();
|
||||
return signOut({
|
||||
...options,
|
||||
callbackUrl: '/',
|
||||
...options,
|
||||
})
|
||||
.then(result => {
|
||||
if (result) {
|
||||
|
||||
Reference in New Issue
Block a user