fix(mobile): unregister push token on invalid session
This commit is contained in:
@@ -172,6 +172,8 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
||||
apiClient.setToken(null);
|
||||
await clearPersistedToken();
|
||||
set({ status: "unauthenticated", user: null, token: null });
|
||||
|
||||
await unregisterPushToken(); // Best-effort
|
||||
},
|
||||
|
||||
clearError: () => set({ error: null }),
|
||||
|
||||
Reference in New Issue
Block a user