Skip to content

activitypub_oauth_require_pkce

github-actions[bot] edited this page Apr 24, 2026 · 2 revisions

Filter whether PKCE is required for public OAuth clients.

Return false to relax the default and allow public clients to complete the authorization code grant without PKCE. This is not recommended.

Auto-generated Example

/**
 * Filter whether PKCE is required for public OAuth clients.
 * 
 * Return false to relax the default and allow public clients to
 * complete the authorization code grant without PKCE. This is
 * not recommended.
 *
 * @param bool   $require 
 * @param string $client_id 
 * @return bool The filtered value.
 */
function my_activitypub_oauth_require_pkce_callback( bool $require, string $client_id ) {
    // Your code here.
    return $require;
}
add_filter( 'activitypub_oauth_require_pkce', 'my_activitypub_oauth_require_pkce_callback', 10, 2 );

Parameters

  • bool $require Whether to require PKCE. Default true.
  • string $client_id The OAuth client ID.

Files

\apply_filters( 'activitypub_oauth_require_pkce', true, $client_id )

← All Hooks

Users

Developers

Clone this wiki locally