Magento 2 — Your Current Session Has Been Expired on Sign in.

Are you stuck here? Signing by correct username and password, but it returns error because Current Session Has Been Expired. It maybe because there is no path that hasadmin/security/session_lifetime value on core_config_data table of your database.

You can add it into that table by adding 1 row of that has the value :

config_id : NULL (automatically)
scope : default
scope_id : 0
path : admin/security/session_lifetime
value : 86400 (1 day by 60*60*24, it's in second)

Next, you need to clean cache : php bin/magento cache:clean or bin/magento cache:clean. Then hard refresh the browser, and sign in.

I wrote these tutorials for myself in future when I forget for the next steps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store