From 084bd2c5ad62423fad9952c1b88de53da2d23ecd Mon Sep 17 00:00:00 2001 From: Anatolii Iumashev Date: Fri, 17 Oct 2025 13:10:23 +0300 Subject: [PATCH 1/3] Bump version to 0.9.251012 in plugin header --- plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.php b/plugin.php index 41d97b3..3454dcf 100644 --- a/plugin.php +++ b/plugin.php @@ -9,7 +9,7 @@ * Domain Path: /languages/ * GitHub Plugin URI: aiiddqd/socialify * Requires PHP: 8.0 - * Version: 0.9.250925 + * Version: 0.9.251012 */ namespace Socialify; From 728366f6ac1a81b54694ed0646d7de47695139f0 Mon Sep 17 00:00:00 2001 From: Anatolii Iumashev Date: Sun, 26 Oct 2025 16:21:58 +0300 Subject: [PATCH 2/3] Fix REST route registration in add_routes method --- includes/AbstractProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/AbstractProvider.php b/includes/AbstractProvider.php index ebfda18..4431be0 100644 --- a/includes/AbstractProvider.php +++ b/includes/AbstractProvider.php @@ -190,8 +190,8 @@ public static function addRoutesSocialify($path) public static function add_routes() { register_rest_route( - 'socialify/', - route: sprintf('%s-auth', static::getProviderKey()), + 'socialify', + route: sprintf('/%s-auth', static::getProviderKey()), args: [ 'methods' => 'GET', 'callback' => [static::class, 'actionAuth'], From fcf1a2523bf99e934ad6a2a7e90236adc3e32dd2 Mon Sep 17 00:00:00 2001 From: Anatolii Iumashev Date: Wed, 7 Jan 2026 08:53:55 +0300 Subject: [PATCH 3/3] Refactor authentication flow and update URL handling in YandexProvider and Endpoints --- includes/AbstractProvider.php | 2 ++ includes/Endpoints.php | 8 ++------ includes/YandexProvider.php | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/includes/AbstractProvider.php b/includes/AbstractProvider.php index 4431be0..52cf778 100644 --- a/includes/AbstractProvider.php +++ b/includes/AbstractProvider.php @@ -209,9 +209,11 @@ public static function getProviderDataFromUserMeta($user_id) public static function authenticateByProviderProfile($providerProfile) { $user = self::getUserByIdFromProvider($providerProfile->identifier); + if (empty($user)) { $user = self::tryRegisterUserByProviderProfile($providerProfile); } + if ($user) { self::setCurrentUser($user); return $user; diff --git a/includes/Endpoints.php b/includes/Endpoints.php index ad32f65..90582ec 100644 --- a/includes/Endpoints.php +++ b/includes/Endpoints.php @@ -1,11 +1,7 @@