Skip to content

Forward provider errors from OAuth2 redirect to the client - #2

Merged
jhoyt15 merged 1 commit into
mainfrom
jhoyt_cancel_error
Nov 11, 2026
Merged

jhoyt15 merged 1 commit into
mainfrom
jhoyt_cancel_error

Conversation

@jhoyt15

@jhoyt15 jhoyt15 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

When a user cancels OpenID or permission consent, the provider calls the redirect endpoint with error=access_denied and state but no code. The handler required code, so it returned a StatusBadRequest fault to the browser and never redirected to the client listener, leaving MATLAB waiting until timeout.

Now a callback with a valid state and either code or error is forwarded to the client (query preserved), and the page shows a cancellation message. Missing/invalid state still returns a fault, so redirect target validation is unchanged.

  • Add localized cancellation message (en-US, fr-FR) and regenerate catalog
  • Document error/error_description params; code no longer required
  • Add redirect tests for cancelled consent and invalid inputs
  • Handle error/error_description in the MATLAB example

When a user cancels OpenID or permission consent, the provider calls the
redirect endpoint with error=access_denied and state but no code. The
handler required code, so it returned a StatusBadRequest fault to the
browser and never redirected to the client listener, leaving MATLAB
waiting until timeout.

Now a callback with a valid state and either code or error is forwarded
to the client (query preserved), and the page shows a cancellation
message. Missing/invalid state still returns a fault, so redirect
target validation is unchanged.

- Add localized cancellation message (en-US, fr-FR) and regenerate catalog
- Document error/error_description params; code no longer required
- Add redirect tests for cancelled consent and invalid inputs
- Handle error/error_description in the MATLAB example

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jhoyt15 jhoyt15 self-assigned this Oct 15, 2026
@jhoyt15
jhoyt15 requested a review from mw-gregs October 15, 2026 18:20
@jhoyt15
jhoyt15 merged commit 7d0f787 into main Nov 11, 2026
5 checks passed
@jhoyt15
jhoyt15 deleted the jhoyt_cancel_error branch November 11, 2026 18:56
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