diff --git a/public/class-jwt-auth-public.php b/public/class-jwt-auth-public.php index eca85ca..daf03ea 100644 --- a/public/class-jwt-auth-public.php +++ b/public/class-jwt-auth-public.php @@ -261,7 +261,7 @@ public function determine_current_user( $user ) { $token = $this->validate_token( new WP_REST_Request(), $auth_header ); if ( is_wp_error( $token ) ) { - if ( $token->get_error_code() != 'jwt_auth_no_auth_header' ) { + if ( $token->get_error_code() != 'jwt_auth_no_auth_header' && $token->get_error_code() != 'jwt_auth_invalid_token' ) { /** If there is an error, store it to show it after see rest_pre_dispatch */ $this->jwt_error = $token; }