fix: use pendingNomadServiceUrl to decide wither to register a new client or restore crypto state from nomad service [WPB-24663]#4710
Merged
MohamadJaara merged 1 commit intodevelopfrom Apr 9, 2026
Conversation
…ient or restore crypto state from nomad service
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4710 +/- ##
========================================
Coverage 49.71% 49.71%
========================================
Files 602 602
Lines 20610 20607 -3
Branches 3288 3288
========================================
- Hits 10246 10245 -1
Misses 9398 9398
+ Partials 966 964 -2
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
yamilmedina
approved these changes
Apr 9, 2026
ohassine
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



https://wearezeta.atlassian.net/browse/WPB-24663
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
isNomadProfilesEnabled()) to decide whether to restore crypto state or register a new client. This meant that any SSO login on a Nomad-enabled backend would attempt crypto state restoration, even for non-Nomad login flows.Causes
The
establishSSOSessionsuccess callback in bothLoginSSOViewModelandNewLoginViewModelcalledcoreLogic.getSessionScope(storedUserId).authenticationScope.isNomadProfilesEnabled()to determine the post-login path. This checks a backend feature flag rather than whether the current login flow was actually initiated as a Nomad flow (i.e., with anomadServiceUrl).Solutions
Replaced the backend feature flag check with a local check:
val isNomadFlow = pendingNomadServiceUrl != null, captured before callingestablishSSOSession(sincependingNomadServiceUrlis consumed/nulled during that call). This correctly determines whether the current SSO login was initiated as a Nomad flow based on the presence of a Nomad service URL in the deep link parameters.Testing
Test Coverage
How to Test
nomadServiceUrl) — should attempt crypto state restore as before.