Zend certified PHP/Magento developer

unable to login to magento2 admin panel

I’m trying to develop a new plugin for Magento2. I have tried to follow this article in order to install Magento on my local machine. The problem is after installing it, I couldn’t login to the admin panel.
It sometimes redirects me to the login page immediately after clicking the login button, or it says the account sign-in was incorrect or your account disabled temporarily. Please wait and try again later), i have tried this solutions so far but nothing works:

  1. Deleting the value of the web/cookies/cookie_admin, web/cookies/cookie_httponly, web/cookies/cookie_lifetime, and web/cookies/cookie_path configs from core_config_data table. (actually i didn’t find these keys in the table, so i couldn’t try the solution)
  2. Executing php bin/magento config:set web/secure/use_in_adminhtml 1
  3. Setting the value of ‘web/secure/base_url’ and ‘web/unsecure/base_url’ to here is located in my
  4. localhost ‘http://127.0.0.1/magento/pub/’
  5. Switching to developer mode
  6. Unlocking admin account (btw, it wasn’t locked)
  7. Creating a new admin account
  8. Changing the password of existing admin account
  9. Disabling Magento_TwoFactoryAuth module
  10. Increasing max_input_vars value to 10,000, memory_limit to 4G, and max_execution_time to 18,000
  11. Changing the host in env.php from localhost to 127.0.0.1
  12. Enabling Soap, Sockets, Sodium, and Xsl extensions
  13. Deleting var and generated folders
  14. failures_num is 0 and first_failure is NULL in admin_user table
  15. Changing the part of the code that responsible for comparing received password with actual password in the compareStrings function in vendor/laminas/laminas-crypt/src/Utils.php class

if (function_exists('hash_equals')) { return hash_equals($expected, $actual); }
with

if (function_exists('hash_equals')) { return true; }

I’m using php v8.1.10

Any suggestions?