trusted_devices_storage = $storage->get_trusted_devices_storage(); } public function supports( $user ): bool { return $this->user_storage->is_wp_user_set() && $this->user_storage->is_totp_enabled() && $this->trusted_devices_storage->is_device_trusted( $this->user_storage->get_user_id() ); } /** * @param WP_Error|WP_User $user * * @return bool|JSON_Response|View_Response|Redirect_Response */ protected function handle( $user ) { Dispatcher::dispatch( new Trusted_Device_Login_Completed( $this->get_user_id() ) ); return $this->json( [ 'user_id' => $this->user_storage->get_user_id() ], Code::OK ); } }