Skip to content

Migrate remaining authorisation-endpoint errors to redirect responses #6

Description

@roborourke

`Endpoints\Authorization::handle_request()` calls `wp_die()` on every `WP_Error` returned from `handle_authorisation()` — there's a `// TODO: Handle it.` marking the spot. RFC 6749 §4.1.2.1 says most of these should redirect to the client with an error instead, since `wp_die()`'s HTML page is useless to a native or mobile client.

PKCE errors (#1) already do this via a new `get_error_redirect_url()` helper on `Types\Base` (query string for the authorization_code grant, fragment for implicit), scoped narrowly to keep that PR reviewable. This issue is migrating the rest: invalid nonce, invalid submit, unsupported `response_type`, and so on, following the same rule — an error before the redirect URI is validated dies, one after it redirects.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions