[MBL-19940][Student] Fix users being logged out when using multi-view#3628
[MBL-19940][Student] Fix users being logged out when using multi-view#3628kristofnemere merged 1 commit intomasterfrom
Conversation
When entering split-screen/multi-window mode, the app fetched environment feature flags with shouldIgnoreToken = true, which caused the auth system to invalidate the session and log the user out. Removing that flag ensures the request is made with the proper auth token. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Review Summary
This is a small, focused change with a meaningful behavioural impact.
What changed: shouldIgnoreToken = true is removed from the RestParams passed to getEnvironmentFeatureFlags in FeatureFlagProvider.fetchEnvironmentFeatureFlags(). Previously the GET /api/v1/features/environment call was made without the Authorization: Bearer header; after this change it will include the token (since shouldIgnoreToken defaults to false).
Consistency: This aligns FeatureFlagProvider with every other call-site for the same endpoint (SplashRepository, CallbackActivity, SplashActivity, FeaturesManager) — none of which set shouldIgnoreToken = true. The original flag appears to have been an unnecessary deviation from the norm.
No concerns found:
- The Canvas
/features/environmentendpoint is called only after the user is authenticated (the result is immediately stored byapiPrefs.user?.id), so a valid token is always available at call time. - No security issues introduced — the token is scoped to the authenticated user and is already sent to this same endpoint by all other callers.
- No performance impact.
One suggestion (non-blocking): The existing test uses any() for RestParams, so it doesn't guard against the params reverting. See the inline comment for a tightening suggestion.
Checklist:
- Consider updating the
Save environment feature flagstest to assert specificRestParams(noshouldIgnoreToken) so the test acts as a regression guard for this fix.
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Tue, 07 Apr 2026 10:54:58 GMT |
|
QA 👍 |
📊 Code Coverage Report✅ Student
✅ Teacher
|
Test plan:
refs: MBL-19940
affects: Student
release note: Fixed an issue where students were logged out when entering split-screen or multi-window mode on Android tablets.
Checklist