fix(auth): redirect to splash after logout

This commit is contained in:
2026-06-17 15:07:16 +08:00
parent 0d2a515e51
commit bda1605ce7
7 changed files with 48 additions and 5 deletions
+5
View File
@@ -97,6 +97,11 @@ export const oauthSignInActor = fromPromise<void, AuthProvider>(async ({ input }
}
});
export const logoutActor = fromPromise<void>(async () => {
const result = await authRepo.logout();
if (Result.isErr(result)) throw result.error;
});
// ========== OAuth token → 后端业务 token sync actors ==========
// 由 <OAuthSessionSync /> 在 NextAuth 回调后派发(监听 useSession())。
// 用 OAuth provider 的 idToken / accessToken 调后端换业务 token + user。