fix: Use wp_signon for proper WordPress authentication in standalone login

This commit is contained in:
dwindown
2025-11-05 00:11:20 +07:00
parent 04e02f1d67
commit 15f0bcb4e4
4 changed files with 20 additions and 10 deletions

View File

@@ -37,6 +37,11 @@ export function Login() {
window.WNW_CONFIG.currentUser = data.user;
window.WNW_CONFIG.nonce = data.nonce;
// CRITICAL: Also update WNW_API.nonce for API requests
if (window.WNW_API) {
window.WNW_API.nonce = data.nonce;
}
// Redirect to dashboard (no reload needed, auth state is updated)
navigate('/dashboard');
} else {