Merge branch 't3/upgrade-expo-sdk-58' into t3/pocketbase-token-refresh

Keep automatic token refresh and clear the device widget on logout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
joshuafhigginsandCursor committed 2026-10-22 18:43:25 -04:00 Verified
commit df24ec4a6a
43 files changed
+852 -1070

No files matched your search

+2
View File
@@ -3,6 +3,7 @@ import { AppState } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import api, { isAuthCollection, isRevokedAuthError } from '../services/api';
import { getJwtExpiryMs } from '../services/jwtExpiry';
import { syncDevicesToWidget } from '../services/widgetSync';
import { AuthResponse, User } from '../types';
interface AuthContextType {
@@ -311,6 +312,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
const logout = async () => {
try {
await clearSession();
syncDevicesToWidget([]);
} catch (error) {
console.error('Failed to logout', error);
}