Does the AAL1 session duration limit apply to users without MFA enrolled? #51826
Replies: 2 comments
|
No, it doesn't touch users without MFA. The limit only kicks in when the session's AAL is lower than the highest AAL the user could reach. From if config.AllowLowAAL != nil && *config.AllowLowAAL != 0 &&
CompareAAL(ParseAAL(s.AAL), userHighestPossibleAAL) < 0 &&
now.After(s.CreatedAt.Add(*config.AllowLowAAL)) {
return SessionLowAAL
}
For a user with a verified factor who stays at aal1, the window counts from session creation, not from the last refresh. After that, refreshing fails with Time-box and inactivity timeout are separate checks, and they apply to every session whether or not MFA is enrolled. So for optional MFA with long-lived mobile sessions, the AAL1 limit is safe to turn on. Time-box and inactivity timeout are the settings that would log everyone out. |
|
The public docs don't cover this setting, but the Auth server source settles it. In
So your interpretation is correct:
For Flutter with optional MFA: the SDK's auto-refresh will start failing for an enrolled user who never stepped up. Handle the sign-out event and send them to the MFA challenge, rather than treating it as an error. Use If you also want MFA users held to aal2 for sensitive data, enforce it in RLS with a restrictive policy on |
Uh oh!
There was an error while loading. Please reload this page.
Does "Limit duration of AAL1 sessions" apply to users without MFA enabled?**
Hello Supabase team,
We are developing Vicoart, a Flutter mobile application for Android and iOS using Supabase Auth.
We would appreciate an authoritative clarification about the "Limit duration of AAL1 sessions" authentication setting and its relationship to MFA enrollment.
Context
Our application uses standard Supabase authentication and persistent mobile sessions.
We need to understand the exact behavior of the AAL1 session duration limit before finalizing our authentication and session-management policies.
According to the Supabase documentation:
aal1represents conventional first-factor authentication.aal2represents authentication with an additional verified factor.currentLevel = aal1andnextLevel = aal1.currentLevel = aal1andnextLevel = aal2.Technical questions
1. Users without MFA enrolled
Does the "Limit duration of AAL1 sessions" setting restrict sessions belonging to users who have never enrolled an MFA factor?
Or is this restriction relevant only when a higher assurance level (
aal2) is available for that user?2. Users with MFA enrolled
If an MFA-enabled user signs in using only the first factor and remains at
aal1, does the configured limit apply until the session is upgraded toaal2?3. Session refresh behavior
When the configured AAL1 duration is exceeded:
4. Interaction with other session settings
How does this setting interact with:
5. Recommended mobile configuration
For a Flutter application where MFA is not mandatory, what is the recommended configuration to maintain secure, persistent sessions without unexpectedly signing out users who have not enrolled MFA?
Expected clarification
We would like to establish whether the following interpretation is correct:
If possible, could a Supabase maintainer confirm the intended behavior and whether it is consistent across hosted Supabase Auth deployments?
References
We also submitted a support request regarding this clarification (ticket SU-505292), but have not yet received a technical answer.
Thank you for your help.
All reactions