title: TYPO3 authenticating user failing using SaltedPasswordsUtility
body: <p>I want to authenticate a custom FrontendUser via my REST-API in a Controller. I tried to hash the password with <em>SaltedPasswordsUtility</em> using <a href="https://docs.typo3.org/typo3cms/extensions/saltedpasswords/8.7/DevelopersGuide/Index.html" rel="nofollow noreferrer">this guide</a>.</p>
  
  <p>I get every request a different hash from the same password. I assume this is because the salt is not consistent.</p>
  
  <p>How can I compare the plain text password to the password hash in the database or is there an entirely other way to achieve the same?</p>
  
  <p>My code so far is:</p>
  
  <pre><code>  /**
    * action check
    *
    * @param string $username
    * @param string $password
    * @return string
    */
    public function checkAction(string $username, string $password)
    {
      $user = $this-&gt;userRepository-&gt;findOneByUsername($username);
  
      $saltedPassword = '';
  
      if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
              $objSalt = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(NULL);
              if (is_object($objSalt)) {
                      $saltedPassword = $objSalt-&gt;getHashedPassword($password);
              }
      }
  
      echo $saltedPassword;
      echo "&lt;br&gt;";
  
      $saltedPassword = $user-&gt;getPassword();
      // keeps status if plain-text password matches given salted user password hash
      $success = FALSE;
  
      if (\TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
        $objSalt = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance($saltedPassword);
        if (is_object($objSalt)) {
          $success = $objSalt-&gt;checkPassword($password, $saltedPassword);
        }
      }
      echo $saltedPassword;
      return "";
    }
  </code></pre>