fix(oauth): fail prompt=none step-up instead of challenging - #21103
Open
StaberindeZA wants to merge 1 commit into
Open
fix(oauth): fail prompt=none step-up instead of challenging#21103StaberindeZA wants to merge 1 commit into
StaberindeZA wants to merge 1 commit into
Conversation
StaberindeZA
force-pushed
the
fxa-12860
branch
3 times, most recently
from
August 25, 2026 22:36
0c49c2c to
77a6f72
Compare
StaberindeZA
force-pushed
the
fxa-12860
branch
4 times, most recently
from
August 27, 2026 15:29
d753561 to
e4872c6
Compare
StaberindeZA
force-pushed
the
fxa-12860
branch
2 times, most recently
from
August 27, 2026 15:55
10c2a66 to
3cad712
Compare
StaberindeZA
marked this pull request as ready for review
August 27, 2026 17:02
Contributor
There was a problem hiding this comment.
Pull request overview
Adds RFC 9470-compliant handling for prompt=none OAuth step-up failures.
Changes:
- Maps errno 170 to
unmet_authentication_requirements. - Redirects eligible failures to the RP.
- Adds documentation and unit/functional coverage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Signin/utils.ts |
Maps step-up failures to the OAuth error. |
Signin/utils.test.ts |
Tests prompt-none navigation behavior. |
Signin/interfaces.ts |
Adds the prompt-none navigation flag. |
Authorization/container.tsx |
Supplies the flag and relays errors. |
Authorization/container.test.tsx |
Tests RP error redirection. |
oauth-web-integration.test.ts |
Tests error URL and state handling. |
oauth-errors.ts |
Defines the new OAuth error. |
grant.spec.ts |
Verifies achieved AAL claims. |
oauth-api.ts |
Documents step-up behavior and errno 170. |
stepUpAuth.spec.ts |
Adds end-to-end prompt-none coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Because: * RFC 9470 section 5 requires the authorization request to fail with unmet_authentication_requirements when the requested authentication level cannot be reached; FxA had no such path * a prompt=none step-up routed the user to an interactive 2FA page, which the parameter forbids, and the RP was never told This commit: * adds an UNMET_AUTHENTICATION_REQUIREMENTS oauth error carrying the RFC error code, relayed by the authorization route's existing getRedirectWithErrorUrl path * fails prompt=none step-up requests instead of routing to a challenge, for errno 170 only — an unverified session is interaction_required * documents errno 170 and the step-up parameters on /oauth/authorization * pins that the id_token acr claim reflects the achieved AAL Closes #FXA-12860
StaberindeZA
force-pushed
the
fxa-12860
branch
from
August 27, 2026 17:30
3cad712 to
e71b2d7
Compare
This was referenced Aug 27, 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.
Because
unmet_authentication_requirementswhen the requested authentication level cannot be reached. FxA had no such path.prompt=nonestep-up request routed the user to an interactive 2FA page, which the parameter forbids, and the RP was never told its request failed.This pull request
UNMET_AUTHENTICATION_REQUIREMENTStoOAUTH_ERRORS, carryingresponse_error_code: 'unmet_authentication_requirements'.prompt=nonestep-up requests ingetOAuthNavigationTargetinstead of routing to an interactive challenge, on errno 170 only.isPromptNoneRequestnavigation option set only by the Authorization container, the one caller that relays a returned error to the RP.POST /oauth/authorization.acrclaim reflects the achieved AAL.Issue that this pull request solves
Closes: FXA-12860
Checklist
Put an
xin the boxes that applyHow to review (Optional)
prompt=noneshort-circuit inpackages/fxa-settings/src/pages/Signin/utils.ts, and whereisPromptNoneRequestis set inpackages/fxa-settings/src/pages/Authorization/container.tsx.Signin/utils.ts→Authorization/container.tsx→ tests.integration.wantsPromptNone(), becauseprompt=nonecan outlive the authorization route in the query string. Every otherhandleNavigationcaller renders errors in-FxA, so returning one to them would dead-end the user instead of completing enrolment.Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Scoped to
prompt=none. The ticket also describes returning this error when a user declines to enrol a second factor, which is not in this PR:MfaGuardCoreonly renders its modal when themfa:2faJWT is absent, and that JWT is already minted during TOTP setup — soonDismissthere is reachable only via a stale-JWT re-prompt mid-enrolment, where treating it as a decline would discard a confirmed phone number and generated backup codes./signin_totp_code,/signin_token_code) still dead-ends without notifying the RP. Those surfaces have no decline control and none was added.The decline half wants its own ticket with UX input. FXA-14408 covers the adjacent
prompt=nonegap for unverified sessions, whereinteraction_requiredis the correct code rather thanunmet_authentication_requirements.