Skip to content

[Android] AuthFlowTester: display mainSid/uiSid and assert them in tests - #3020

Merged
wmathurin merged 3 commits into
forcedotcom:devfrom
wmathurin:ui-sid
Sep 1, 2026
Merged

[Android] AuthFlowTester: display mainSid/uiSid and assert them in tests#3020
wmathurin merged 3 commits into
forcedotcom:devfrom
wmathurin:ui-sid

Conversation

@wmathurin

Copy link
Copy Markdown
Contributor

Summary

  • UserCredentialsView: Adds MAIN_SID and UI_SID constants; adds rows for mainSid and uiSid in the Domains and SIDs section; includes them in the JSON export.
  • AuthFlowTesterPageObject: Adds private validateSIDs(isDpop, accessToken) method that asserts:
    • mainSid is always non-empty
    • uiSid is non-empty when DPoP is active
    • mainSid == uiSid (DPoP), mainSid == parentSid (JWT hybrid), or mainSid == accessToken (opaque Bearer)
    • Called from validateOAuthValues

Dependencies

Builds on top of merged PRs:

  • #3018 — feat: capture ui_sid from DPoP token responses
  • #3019 — fix: clear stale uiSid on DPoP-to-Bearer downgrade

Related iOS PR: forcedotcom/SalesforceMobileSDK-iOS#4157

Test plan

  • DPoP test: testECAJwtDPoP_ViaLoginPoolServer — verifies uiSid non-empty and mainSid == uiSid
  • JWT + hybrid test: testECAJwt_DefaultScopes — verifies mainSid == parentSid
  • Non-DPoP non-JWT test: testCAOpaque_DefaultScopes — verifies mainSid == accessToken

- UserCredentialsView: add MAIN_SID and UI_SID constants and rows in Domains and SIDs section; include in JSON export
- AuthFlowTesterPageObject: add validateSIDs private method; assert mainSid always non-empty, uiSid non-empty on DPoP, and mainSid == uiSid (DPoP) / parentSid (JWT hybrid) / accessToken (opaque); call from validateOAuthValues
getSensitiveValue returns the literal string "(empty)" when a field has
no value, not an empty string. Without this fix the uiSid branch fires
incorrectly for non-DPoP logins, causing a spurious assertion failure.
Add domain+SID checks (content/lightning/VF, gated on scope and hybrid
flow) and parentSid presence check (gated on JWT+hybrid) to match the
full set of assertions in the iOS assertSIDs function. Also expose the
six domain/SID label constants so the page object can reference them,
and thread useHybridAuthToken through validateOAuthValues from
loginAndValidate.
@wmathurin
wmathurin merged commit ca5c9d0 into forcedotcom:dev Sep 1, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants