feat(app-expo): replay brand splash on logout and route to login
After sign-out or data purge, clear session state reliably, remount the splash overlay above navigation, and navigate to login instead of tabs so users no longer briefly land on the chat home screen. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { MemoirReadingSettingsProvider } from '@/core/memoir-reading-settings-co
|
||||
import { NetworkError } from '@/core/api/types';
|
||||
import { tokenManager } from '@/core/auth/token-manager';
|
||||
import { config } from '@/core/config';
|
||||
import { authKeys } from '@/features/auth/auth-query-keys';
|
||||
import { AppQueryProvider, queryClient } from '@/core/query';
|
||||
|
||||
/**
|
||||
@@ -49,8 +50,8 @@ async function refreshTokens(): Promise<boolean> {
|
||||
* since the cache flip is the authoritative signal.
|
||||
*/
|
||||
function onAuthFailure() {
|
||||
queryClient.setQueryData(['auth', 'token-check'], false);
|
||||
queryClient.setQueryData(['session'], null);
|
||||
queryClient.setQueryData(authKeys.tokenCheck, false);
|
||||
queryClient.setQueryData(authKeys.session, null);
|
||||
tokenManager.clearTokens();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user