Skip to content

Conversation

@barkerja
Copy link

@barkerja barkerja commented Dec 8, 2025

Add form_post response mode support

Implement OAuth 2.0 Form Post Response Mode per the OpenID specification. This delivers authorization responses via an auto-submitting HTML form that POSTs to the client's redirect_uri.

Changes:

  • Add form_post to response_mode validation (query|fragment|form_post)
  • Extend response_mode support to code and token flows (was hybrid only)
  • Create FormPostResponse struct with params/1 helper
  • Add form_post_success/2 and form_post_error/2 behaviour callbacks
  • Route errors to form_post_error when response_mode is form_post
  • Document CSP form-action directive and security headers

Spec: https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html

Closes #10

Add form_post response mode support

  Implement OAuth 2.0 Form Post Response Mode per the OpenID
specification.
  This delivers authorization responses via an auto-submitting HTML form
  that POSTs to the client's redirect_uri.

  Changes:
  - Add form_post to response_mode validation (query|fragment|form_post)
  - Extend response_mode support to code and token flows (was hybrid
only)
  - Create FormPostResponse struct with params/1 helper
  - Add form_post_success/2 and form_post_error/2 behaviour callbacks
  - Route errors to form_post_error when response_mode is form_post
  - Document CSP form-action directive and security headers

  Spec:
https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html
@barkerja barkerja changed the title Added support form_post response mode Added form_post response mode Dec 16, 2025
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.

Response Mode: form_post

1 participant