在orangehrm上,Csrf令牌验证失败

I am getting an error with OrangeHRM platform(Human resources management).

The issue is that when logging to the site after some time (like 15 minutes) site refreshes showing the error at the image below. When logging again everything works as expected.

So i guess the the csrf value is somehow stored in the cache and used when trying to log in for the first time. After failing and refreshing the site uses the real noncached csrf value.

I have found someone with the same issue here (stackoverflow.com) The answer to the problem was that they were serving the site on http only. In my case the error exists in the production environment as well so it's not an https issue.

Any idea is welcome.

Error screenshot