fix: Use WordPress native login instead of custom login page for nonce consistency
This commit is contained in:
@@ -461,12 +461,11 @@ function AuthWrapper() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.WNW_CONFIG?.standaloneMode && !isAuthenticated && location.pathname !== '/login') {
|
if (window.WNW_CONFIG?.standaloneMode && !isAuthenticated) {
|
||||||
return <Navigate to="/login" replace />;
|
// Redirect to WordPress login with return URL
|
||||||
}
|
const returnUrl = encodeURIComponent(window.location.href);
|
||||||
|
window.location.href = `/wp-login.php?redirect_to=${returnUrl}`;
|
||||||
if (location.pathname === '/login' && isAuthenticated) {
|
return null;
|
||||||
return <Navigate to="/" replace />;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user