fix: Enable period selector, add SSL support for wp_signon, add debug logging

This commit is contained in:
dwindown
2025-11-05 00:27:00 +07:00
parent 5166ac4bd3
commit ea97a95f34
3 changed files with 11 additions and 4 deletions

View File

@@ -38,7 +38,13 @@ class AuthController {
'remember' => true,
];
$user = wp_signon( $credentials, false );
$user = wp_signon( $credentials, is_ssl() );
// Debug logging
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
error_log( '[AuthController::login] wp_signon result: ' . ( is_wp_error( $user ) ? 'ERROR' : 'SUCCESS' ) );
error_log( '[AuthController::login] User ID: ' . ( is_wp_error( $user ) ? 'N/A' : $user->ID ) );
}
if ( is_wp_error( $user ) ) {
return new WP_REST_Response( [