Issue: When a user logs out and logs back in without closing and reopening the app, they sometimes see the alert message: `Your session has expired. Please log in again.` Possible Causes: - The old session token might still be cached and interfering with the new session. - The authentication state isn't being fully reset on logout. - The app might still be using an expired token for some API requests after re-login. Potential Fixes: 1. Ensure all authentication-related data (session tokens, user info) is cleared on logout. 2. After login, confirm that the app uses the new authentication token for all requests. 3. Add a check to fetch a fresh token upon login and validate it before making requests. 4. If using a persistent session store (e.g., AsyncStorage), make sure it's properly updated upon re-login.
Activity