AOSSIE-Org / AOSSIE-Org/Resonate

Login screen briefly appears for already authenticated users on app launch

Open
#750 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
344
Forks
350
PR merge metrics
No merged PRs in 30d

Description

### Description

When the app is opened by a user who is already registered and authenticated, the login screen is shown briefly (for ~1–3 seconds) before the app navigates to the authenticated/home screen.

This creates a visible flicker where the login UI appears even though the user is already signed in.

---

### Steps to Reproduce

1. Log in to the app successfully.
2. Close the app completely.
3. Reopen the app.
4. Observe that the login screen appears briefly before redirecting to the main screen.

---

### Expected Behavior

If a valid authenticated session already exists, the app should directly navigate to the authenticated/home screen without showing the login screen.

---

### Actual Behavior

The login screen is rendered first and then replaced by the authenticated screen after a short delay (1–3 seconds).

---

### Possible Cause

Authentication/session state appears to be checked asynchronously after the initial UI is rendered, causing a temporary fallback to the login screen before the auth state is resolved.

---

### Motivation

Improving this flow would provide a smoother user experience and prevent unnecessary UI flicker during app startup.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.