PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/myyoast-client/application/oauth-grant-handler.php +6 -1 27.9 → trunk View file →
@@ -94,9 +94,14 @@
94 94 *
95 95 * @throws Token_Request_Failed_Exception If the token request fails.
96 96 */
97 97 public function request_token( Grant_Interface $grant, Resource_Indicator $resource_indicator ): Token_Set {
98 - $registered_client = $this->client_registration->ensure_registered();
98 + // A token request requires an existing registration; it never triggers DCR or a
99 + // redirect-URI update — that is the connect flow's responsibility.
100 + $registered_client = $this->client_registration->get_registered_client();
101 + if ( $registered_client === null ) {
102 + throw new Token_Request_Failed_Exception( 'not_registered', 'Site is not registered with MyYoast; complete the connect flow first.' );
103 + }
99 104
100 105 try {
101 106 $token_endpoint = $this->discovery->get_document()->get_token_endpoint();
102 107 } catch ( Discovery_Failed_Exception | Server_Capability_Exception $e ) {