Skip to content

Send Native Auth V2 authorize scopes and claims, Fixes AB#3784690 - #3317

Merged
Disha Janardhan (djanardhan98) merged 9 commits into
devfrom
djanardhan/native-auth-v2-authorize-inputs
Oct 20, 2026
Merged

Disha Janardhan (djanardhan98) merged 9 commits into
devfrom
djanardhan/native-auth-v2-authorize-inputs

Conversation

@djanardhan98

@djanardhan98 Disha Janardhan (djanardhan98) commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Port Common Native Auth V2 authorize-request inputs and related OTP parity from AzureAD/microsoft-authentication-library-for-js#8898.

  • Build on the existing authorize-challenge scope serialization and add initial claims propagation.
  • Include default OIDC scopes for sign-in, sign-up, and reset; canonicalize only recognized OIDC defaults while preserving resource scopes.
  • Preserve entry scopes for absent continuation inputs and honor explicitly empty continuation inputs.
  • Exclude claims from token serialization while retaining local metadata; keep scopes on token requests.
  • Allow empty OTP values to reach service validation and preserve existing password-to-email fallback and V1 behavior.

Approved wire policy: scopes and optional claims at initial authorize-challenge, scopes without claims at token exchange, neither on other intermediate requests. This intentionally follows JS behavior rather than the work item's literal entry-only scope wording.

Fixes AB#3784690

Dependencies

Stacked on the separate Common unified-errors PR: #3307. Its base is the errors branch so the workstream diff stays isolated.
Consumed by the paired MSAL authorize-inputs PR: AzureAD/microsoft-authentication-library-for-android#2619.
Merge the errors dependency first, then retarget this PR to dev.

Validation

Scopes/claims snapshot: 661 selected unit tests passed (218 MSAL, 349 Common4j, 94 Common Android), with zero failures, errors, or skips in the final XML reports.
Coverage includes all three initial entries and token paths, claims wire encoding, continuation scope retention/override, canonical OIDC defaults with preserved resource casing/duplicates, empty OTP submission, and standalone V1 regressions.
Final integrated-stack PR2601 validation: 20 live signup/reset E2E tests and 4 recorder tests passed, with 3 known duplicate-account service-test skips. One Mail.tm /accounts HTTP 429 attempt passed on the existing automatic retry; no assertions or retry configuration were changed.

Fixes AB#3784695

Keep raw suberrors and validated attribute details through parser and command results.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784690

Initial authorize-challenge carries scopes and claims; token carries scope only. Preserve continuation and local claims metadata. Include JS8898 OTP service-validation parity without altering V1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784695

Move diagnostic arguments into their authorize/continue/token APIError constructors; preserve errors-only scope behavior. Independently compiled and covered by focused MSAL/Common suites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784695

Move diagnostic arguments into their authorize/continue/token APIError constructors; preserve errors-only scope behavior. Independently compiled and covered by focused MSAL/Common suites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
(cherry picked from commit 3265533)
Fixes AB#3784690

Canonicalize recognized OIDC defaults to lowercase exactly once at entry and token exchange, preserving resource scope casing, order and duplicates. Keep V1 behavior unchanged. Cover all three entry and token paths with red-green regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Fixes AB#3784690

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753
Preserve authorize scopes and claims while adopting the current unified-error diagnostics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
@djanardhan98 Disha Janardhan (djanardhan98) added the changelog:none No changelog entry or version increment is required. label Oct 19, 2026
@djanardhan98
Disha Janardhan (djanardhan98) marked this pull request as ready for review October 19, 2026 20:10
@djanardhan98
Disha Janardhan (djanardhan98) changed the base branch from djanardhan/native-auth-v2-unified-errors to dev October 20, 2026 16:29
@djanardhan98
Disha Janardhan (djanardhan98) merged commit 0bf4510 into dev Oct 20, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:none No changelog entry or version increment is required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants