Skip to content

Keep Cancel and offer Try again when a consent page fails - #4951

Merged
yannickmonney merged 1 commit into
mainfrom
fix/oauth-consent-cancel
Oct 13, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/oauth-consent-cancel

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Closes #4901.

What

The Continue with Tale page (the sign-in screen another application sends people to) enabled Allow and Cancel only once it had read the requesting application's name. When that lookup failed, both buttons stayed dead: the person could not send the waiting application a refusal, the application waited for its own timeout, and the alert said to start again with nothing to press. Only the continuation page had a Try again.

  • Cancel now depends only on whether an answer is in flight. A denial needs no application name, so it works while the lookup is pending and after it has failed.
  • Allow still waits for the name, so nobody agrees to something they cannot see.
  • When the application cannot be read, the page offers Try again in place of the dead Allow.
  • Try again on both pages now runs the whole load again (sign-in, two-factor status, application) instead of only repeating the last call, so it also recovers a sign-in read that failed. Before, the continuation page's retry skipped those steps.

No strings change: the page reuses oauth.retry, oauth.cancel and oauth.failed.

Proof

  • oauth-authorization.test.tsx: eight new tests, written first. With the old component 7 of them fail; the eighth pins what must not change (a failed answer on a page that knows the application keeps Allow and Cancel, and shows no Try again). An axe audit covers the failed state.
  • Real provider, real browser, against a registered application (local stack, the lookup request blocked): the page shows the notice, Try again and Cancel; Cancel reaches the application as error=access_denied with its state; with the lookup unblocked Try again shows "Office application wants to sign you in with Tale." and Allow and continue returns a code; with a slow lookup Cancel is enabled and Allow is not.
  • Gate on the committed tree (pinned bun 1.4.2): lint:links, lint:manual, lint:conflicts, knip, oxlint (type-aware) and both typechecks clean; shared 974, platform server + pii 89 114, docs 716, platform UI 8 117 pass; auth-page-layout.browser.test.tsx, which renders this page, passes (5). The first full UI run timed out once in version-compare-page.test.tsx (5 s, load average 10–12 on this machine; the file passes three times alone in under a second of test time, and the whole suite passed on the re-run). oxfmt --check reports only skill-detail-pane.tsx from fix(skills): protect stale edits with entity tags #4192, which this change does not touch and fix(platform): repair main's Format, Browser and E2E checks #4949 repairs.
  • Manual layer: AUTH-B21 (blocked lookup → Try again and Cancel; slow lookup), its pin, and the automation row for the component half.

Not here

  • The coding-agent consent page keeps Cancel on a failed read already; it still offers no Try again button, only the words "Try again in a moment". That is a polish item.

The Continue with Tale page enabled both buttons only once it had read
the requesting application's name. When that lookup failed (or while it
was pending), Allow and Cancel were both dead: the person could not send
the waiting application a refusal, the application waited for its own
timeout, and only the continuation page had a Try again.

Cancel now depends only on whether an answer is in flight, since a
denial needs no application name; Allow still waits for the name, so
nobody agrees to something they cannot see. When the application cannot
be read the page offers Try again in place of the dead Allow. Try again
runs the whole load again (sign-in, two-factor status, application), on
both pages, so it also recovers a session read that failed.

Observed against a real provider and a registered application: with the
lookup blocked the page shows the notice, Try again and Cancel, and
Cancel reaches the application as access_denied; with the lookup
unblocked Try again shows the application and Allow returns a code; with
a slow lookup Cancel is enabled and Allow is not. The new tests fail on
the old component (7 of 8) and pass on this one.
@yannickmonney
yannickmonney merged commit c62118c into main Oct 13, 2026
@yannickmonney
yannickmonney deleted the fix/oauth-consent-cancel branch October 13, 2026 15:47
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.

bug(platform): the OAuth consent page disables Cancel when it can't load the requesting application

1 participant