fix: Use wp_signon for proper WordPress authentication in standalone login
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user