From e473c60658fccd2b4d586036ab46cb6741b6688b Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 22 Sep 2026 16:53:53 +0530 Subject: [PATCH] fix: use subsite URL for post-login redirects on Multisite Closes #963 --- src/Actions/Authentication.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Actions/Authentication.php b/src/Actions/Authentication.php index bdb265a3..98998e05 100644 --- a/src/Actions/Authentication.php +++ b/src/Actions/Authentication.php @@ -536,19 +536,19 @@ public function onLogin(): void wp_set_current_user($wpUser->ID); wp_set_auth_cookie($wpUser->ID, true); do_action('wp_login', $wpUser->user_login, $wpUser); - wp_redirect('/'); + wp_redirect(get_site_url()); exit; } } } if (null !== $error) { - wp_redirect('/'); + wp_redirect(get_site_url()); exit; } if ($exchangeParameters && null === $error && (0 !== wp_get_current_user()->ID || null !== $this->getSdk()->getCredentials())) { - wp_redirect('/'); + wp_redirect(get_site_url()); exit; } @@ -559,7 +559,7 @@ public function onLogin(): void public function onExchangeFailed(Throwable $_) { // Custom hook ('auth0_token_exchange_failed') to register when token exchange fails. - wp_redirect('/'); + wp_redirect(get_site_url()); exit; }