BUG: Logged-in users are redirected to Login screen on every app launch
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- authentication, mobile
Research direction
Start in splash_screen.dart at SplashScreen._navigateToAuthScreen and inspect the existing splash delay and navigation flow. Check the current Supabase session there, then run the app with both a valid session and no session; done means returning users reach Home or the pending onboarding step while signed-out users still reach AuthScreen.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
📌 Issue Overview
On every app launch, already authenticated users are redirected to the Login/Auth screen instead of being taken directly to their Home screen. The user must sign in again even though their session is still valid.
🔍 Steps to Reproduce
- Install the Patient app and sign in with Google
- Complete onboarding (personal details + assessment + consultation)
- Close the app completely
- Reopen the app
- The Splash screen appears, then navigates to the Login/Auth screen - despite the user already being authenticated
🎯 Expected Behavior
If a valid Supabase session exists, the user should be routed directly to the Home screen (or whichever onboarding step is pending), skipping the Login screen entirely.
🚨 Actual Behavior
SplashScreen._navigateToAuthScreen() unconditionally navigates to AuthScreen after the 3-second delay, with no check for an existing session. This means every returning logged-in user is forced to sign in again on each launch.
Root cause: splash_screen.dart never calls Supabase.instance.client.auth.currentSession - it always pushes AuthScreen regardless of auth state.
📷 Screen Recording
https://github.com/user-attachments/assets/21b77570-f84e-448c-97ac-0908a5965ba1
💡 Suggested Improvements
In SplashScreen, after the splash delay, check Supabase.instance.client.auth.currentSession:
- If a session exists → route to the appropriate screen
- If no session → navigate to
AuthScreenas before.
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
- Dominant language
- Dart
- Stars
- 30
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/NeuroTrack
-
fix(therapist): Method marked @override does not override any inherited methodPossibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#198 ·
-
fix: Don't use BuildContext across async gaps (use_build_context_synchronously)Possibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#197 ·
-
fix(patient): Remove unused and duplicate imports across patient appPossibly taken @Muneerali199 claimed this 259 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AOSSIE-Org/NeuroTrack#195 ·
-
BUG: Therapy details save button has no loading guard, allowing duplicate submissions that inflate patient regression reportsPossibly taken @Varadraj75 claimed this 222 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 68/100
AOSSIE-Org/NeuroTrack#221 ·
-
BUG: Appointment booking ignores selected time slot, every appointment saved at midnight to SupabasePossibly taken @Varadraj75 claimed this 227 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
AOSSIE-Org/NeuroTrack#219 ·
All issues in AOSSIE-Org/NeuroTrack
Similar issues
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
VeryGoodOpenSource/vgv-ai-flutter-plugin#219 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Anxcye/anx-reader#1024 ·
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionPossibly taken @ragavendranbala-TSL claimed this today. OpenNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/flutterfire#19015 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RevenueCat/purchases-flutter#2048 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Baseflow/flutter-geocoding#337 · 1 reaction ·
Maintainers usually reply within 1 day