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:
parent
aad4694c44
commit
761e60bf8c
14
.env
14
.env
|
|
@ -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
|
||||
|
|
|
|||
3
app.json
3
app.json
|
|
@ -19,7 +19,8 @@
|
|||
},
|
||||
"predictiveBackGestureEnabled": false,
|
||||
"package": "com.anonymous.acupedia",
|
||||
"usesCleartextTraffic": true
|
||||
"usesCleartextTraffic": true,
|
||||
"allowBackup": false
|
||||
},
|
||||
"web": {
|
||||
"output": "static",
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ export const useAuthStore = create<AuthStore>()(
|
|||
return;
|
||||
}
|
||||
setApiAccessToken(state?.accessToken ?? null);
|
||||
if (state?.accessToken && state?.isAuthenticated) {
|
||||
void useAuthStore.getState().refreshSession();
|
||||
}
|
||||
},
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue