From 7a9054bb3f033c98067b3196378311dae54c5fbf Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 20 Jan 2026 01:31:53 +0000
Subject: [PATCH] =OperationQueue refactor to the JVBase/managers/queue namespace
---
inc/rest/routes/LoginRoutes.php | 23 ++++-------------------
1 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/inc/rest/routes/LoginRoutes.php b/inc/rest/routes/LoginRoutes.php
index 226692b..9762e9f 100644
--- a/inc/rest/routes/LoginRoutes.php
+++ b/inc/rest/routes/LoginRoutes.php
@@ -31,23 +31,7 @@
register_rest_route($this->namespace, '/auth/login', [
'methods' => 'POST',
'callback' => [$this, 'handleLogin'],
- 'permission_callback' => [$this, 'checkRateLimit'],
- 'args' => [
- 'user_email' => [
- 'required' => true,
- 'type' => 'string',
- 'sanitize_callback' => 'sanitize_email'
- ],
- 'user_password' => [
- 'required' => true,
- 'type' => 'string'
- ],
- 'remember_me' => [
- 'required' => false,
- 'type' => 'boolean',
- 'default' => false
- ]
- ]
+ 'permission_callback' => [$this, 'checkRateLimit']
]);
// Logout endpoint
@@ -125,7 +109,8 @@
public function handleLogin(WP_REST_Request $request): WP_REST_Response
{
- $data = $request->get_json_params();
+ $data = $request->get_params();
+ error_log('Data: '.print_r($data, true));
// Verify Turnstile
if (!$this->verifyTurnstile($data['cf-turnstile-response'] ?? '')) {
return $this->error('Security verification failed', 'turnstile_failed', 403);
@@ -584,7 +569,7 @@
];
}
- protected function getRedirect(WP_User $user, string $url, string $context = 'login'):string
+ protected function getRedirect(WP_User $user, ?string $url=null, string $context = 'login'):string
{
if (!empty($url)) {
$url = sanitize_url($url);
--
Gitblit v1.10.0