fix(auth): disable android auto-backup and proactively sync session on startup

- Disable allowBackup in app.json (and AndroidManifest.xml) to prevent stale session restoration on clean APK installs
- Proactively call refreshSession on storage rehydration so module access and identity are immediately synced on app launch
- Clean up git conflict markers in .env file
This commit is contained in:
Urvish Prajapati 2026-09-17 16:34:41 +05:30
parent aad4694c44
commit 761e60bf8c
3 changed files with 9 additions and 11 deletions

14
.env
View File

@ -10,11 +10,6 @@
# ---- Local Standalone Backend (FastAPI on Port 8000) ----
# For Local Web: http://localhost:8000/api
# For Physical Mobile Devices: http://YOUR_LOCAL_IP:8000/api
<<<<<<< Updated upstream
EXPO_PUBLIC_API_URL=http://localhost:8000/api
EXPO_PUBLIC_BACKEND_PORT=8000
EXPO_PUBLIC_MEDIA_BASE_URL=http://localhost:9000/
=======
# EXPO_PUBLIC_API_URL=http://localhost:8000/api
# EXPO_PUBLIC_BACKEND_PORT=8000
# EXPO_PUBLIC_MEDIA_BASE_URL=http://localhost:9000/
@ -22,10 +17,9 @@ EXPO_PUBLIC_MEDIA_BASE_URL=http://localhost:9000/
# old working .env file
# Production Dev
EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
# EXPO_PUBLIC_API_URL=https://api.acupedia.in/api
# EXPO_PUBLIC_STOREFRONT_URL=https://acupedia.in/store
# Local Dev
# EXPO_PUBLIC_API_URL=http://localhost:8000/api
# EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000
>>>>>>> Stashed changes
EXPO_PUBLIC_API_URL=http://localhost:8000/api
EXPO_PUBLIC_STOREFRONT_URL=http://localhost:3000

View File

@ -19,7 +19,8 @@
},
"predictiveBackGestureEnabled": false,
"package": "com.anonymous.acupedia",
"usesCleartextTraffic": true
"usesCleartextTraffic": true,
"allowBackup": false
},
"web": {
"output": "static",

View File

@ -269,6 +269,9 @@ export const useAuthStore = create<AuthStore>()(
return;
}
setApiAccessToken(state?.accessToken ?? null);
if (state?.accessToken && state?.isAuthenticated) {
void useAuthStore.getState().refreshSession();
}
},
},
),