authentication = $authentication; } /** * Check customer password * * @param string $password * @param int $customerId * @throws GraphQlAuthenticationException */ public function execute(string $password, int $customerId) { try { $this->authentication->authenticate($customerId, $password); } catch (InvalidEmailOrPasswordException $e) { throw new GraphQlAuthenticationException( __('The password doesn\'t match this account. Verify the password and try again.') ); } } }