Repository navigation
Add Native Auth V2 email sign-up E2E coverage - #2601
Closed
Disha Janardhan (djanardhan98) wants to merge 8 commits into
Closed
Disha Janardhan (djanardhan98) wants to merge 8 commits into
Disha Janardhan (djanardhan98) wants to merge 8 commits into
Conversation
Add Mail.tm-backed coverage for hero scenarios 1a through 1f, including invalid OTP retries, resend state behavior, sign-in-after-sign-up token validation, and proof that sign-up does not sign in implicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add four Mail.tm-backed email and password sign-up scenarios and extract shared V2 sign-up E2E helpers while preserving the six email OTP scenarios. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cover city and country attributes supplied up front or after email verification for both email OTP and email password Native Auth V2 sign-up flows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add five enabled iOS-parity password-reset scenarios using disposable accounts and a supplied-password resend scenario. Preserve existing sign-up coverage and leave disabled V2 sign-in suites unchanged. Validation: 20 live E2E tests and 4 request-recorder tests passed locally with zero failures or skips. Exclude parity scenarios that exposed unresolved SDK/service or V2 contract differences. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve resend code inequality checks without including OTP values in assertion diagnostics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the expected user-already-exists behavior for OTP and password sign-up while the known service bug returns code-required. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d187a056-8b83-4c74-a4c5-2c2cc043facc
This was referenced Oct 12, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The test-only changes provide coherent coverage, sanitize diagnostics, and introduce no unresolved correctness issues.
0 open findings
What changed in this PR
Adds Native Auth V2 end-to-end coverage for email sign-up and password reset flows.
Changes:
- Adds 20 enabled sign-up and SSPR scenarios plus three disabled parity specifications.
- Verifies explicit sign-in, token issuance, state reuse, attributes, resend, and error recovery.
- Adds sanitized request recording and unit tests.
| File | Description |
|---|---|
NativeAuthRequestRecorderTest.kt |
Tests sanitized request categorization. |
NativeAuthRequestRecorder.kt |
Records endpoint categories without sensitive data. |
SSPRV2Test.kt |
Adds five password-reset scenarios. |
SignUpV2EmailPasswordTest.kt |
Adds password-based sign-up coverage. |
SignUpV2EmailOTPTest.kt |
Adds OTP-based sign-up coverage. |
SignUpV2EmailAbstractTest.kt |
Provides shared sign-up helpers and assertions. |
NativeAuthPublicClientApplicationAbstractTest.kt |
Supports request interceptors in test PCA setup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Closing this PR to reopen the same branch and code as a fresh pull request, linked to October work item #3752312. |
Silviu Petrescu (spetrescu84)
pushed a commit
that referenced
this pull request
Oct 19, 2026
…2618) ## Summary Unify Native Auth V2 terminal errors under `NativeAuthErrorV2`, matching AzureAD/microsoft-authentication-library-for-js#8900. - Remove the operation-specific V2 error classes without deprecated compatibility wrappers. - Expose stable classifiers on the shared error, distinguishing rejected credentials from new-password policy failures and invalid input. - Preserve service diagnostics, correlation, exceptions, and recoverable attribute-validation state. - Keep Native Auth V1 behavior unchanged. **Breaking V2 API change:** replace operation-specific error type checks with `NativeAuthErrorV2` and its classifiers. Fixes [AB#3784695](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784695) ## Dependencies Requires the paired Common unified-error diagnostics PR: AzureAD/microsoft-authentication-library-common-for-android#3307. The Common gitlink points to `3265533f27d8c4054fc5b020ec0228bb872b8344`. Scopes/claims and OTP-service-validation changes are intentionally excluded. ## Validation Errors-only snapshot: **651 selected unit tests passed** (215 MSAL, 346 Common4j, 90 Common Android), with zero failures, errors, or skips in the final XML reports. The gate includes shared classifiers, wrong-password versus invalid-input mappings, diagnostic propagation, and standalone V1 regression coverage. 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. Live validation was executed against the final stacked errors plus scopes/claims sources, not the standalone errors snapshot. The live fixture overlay comes from #2601 and is not included in this feature PR. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753 Copilot-Session: 55791345-e680-4927-a364-f6de503184be Copilot-Session: 495388ac-9812-45ec-9120-b110dcbe5903 Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
Disha Janardhan (djanardhan98)
added a commit
that referenced
this pull request
Oct 21, 2026
## Summary Port Android Native Auth V2 authorize-request inputs and related OTP parity from AzureAD/microsoft-authentication-library-for-js#8898. - Accept optional scopes and typed claims for sign-up and password reset, and propagate inputs for all three V2 entry points. - Snapshot callback inputs and preserve existing cancellation, callback delivery, and password clearing. - Preserve entry scopes when continuation scopes are absent; allow explicitly empty continuation scopes to select default OIDC scopes. - Submit empty/short first-factor and MFA OTPs to the service for validation rather than reject them locally. - Preserve Native Auth V1 behavior and existing password-to-email fallback. **Approved wire policy:** send scopes and optional claims on the initial authorize-challenge; send scopes but no claims on token exchange. Intermediate requests send neither. This intentionally follows JS behavior rather than the work item's literal entry-only scope wording. Fixes [AB#3784690](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3784690) ## Dependencies Stacked on the separate MSAL unified-errors PR: #2618. Its base is the errors branch so this diff contains only the scopes/claims workstream. Requires the paired Common authorize-inputs PR: AzureAD/microsoft-authentication-library-common-for-android#3308. The Common gitlink points to `b41473a29fd7e519108b0630526e652996e38f9f`. Merge the errors dependencies 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, callback input snapshots, continuation scope retention/override, canonical OIDC defaults on entry and token requests, empty/short OTP service 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. The live fixture overlay comes from #2601 and is not included in this feature PR. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0bcd671b-73fa-4ee6-bcd6-65d7eea4d753 Copilot-Session: 55791345-e680-4927-a364-f6de503184be Copilot-Session: 495388ac-9812-45ec-9120-b110dcbe5903 Copilot-Session: eafe5634-2142-4235-a7dc-d26bc1baa0d5
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.
Summary
Scope
This is an incremental, passing subset of V2 E2E coverage, not an exhaustive parity suite. The overlapping iOS V2 scenarios have matching expected outcomes; Android additionally checks selected state-reuse, required-attribute metadata, and request/token behavior.
No production code, dependency, Common pointer, pipeline, or existing disabled V2 sign-in suite changes. Multi-screen/partial attributes, invalid-attribute retries, username-based sign-up, optional attributes, MFA, and JIT are outside this PR.
Scenario coverage
Validation
Recorded live run: September 28, 2026
The local JUnit reports contain:
The subsequent merge from
devdid not change these V2 test sources, their fixture/build configuration, relevant production sources, or the Common pointer.OTP-diagnostic follow-up: September 30, 2026
Disabled duplicate-account parity follow-up: October 8, 2026
user-already-existsresult and is annotated as disabled because the known server bug currently returnscode-required.Notes