[Bug] Login page renders despite active authenticated session
Resolved 💬 1 comment Opened Jun 11, 2026 by PresidentAnderson Closed Jun 14, 2026
Bug Description
AUTHENTICATION BUG FIX
Problem:
The login page is displaying even when an authenticated session already exists.
The header shows:
- Mon compte
- Déconnexion
which means the user is authenticated.
However the login form still renders.
Required fix:
- On page load:
const {
data: { session }
} = await supabase.auth.getSession()
- If session exists:
redirect immediately to the correct workspace.
Examples:
client account:
/app
lawyer account:
/app?view=firm
bailiff account:
/app?view=bailiff
admin:
/admin
- Never render LoginForm if session exists.
Pseudo:
if (session) {
redirect(...)
return null
}
return <LoginForm />
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.173
- Feedback ID: e2929eba-fffa-4f15-b803-e8e7c8323b14
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗