Instability of processing immediately after login

The following phenomenon occurs when I try to log in to Nextcloud with Firefox in my environment.

  • User can’t log in by Firefox even though account information is correct.
  • When a user successfully logs in and opens “Files”. When opened, an unexpected error (After a few seconds, load again) is displayed several times and the user is returned to the login screen. Subsequent logins eliminate the problem. In this case, one login is always successful.

Neither is recorded in the error log.
Users are logged out correctly.

I specify Redis for the session. I think the above phenomenon started when Redis was introduced into the session. And this is only happening in Firefox. It does not occur in Chrome browsers. Firefox settings are not uniform. I am not forcing users to set browser preferences. So most people have encountered.
Occasionally, it can also occur on iOS web browsers.

What should I fix to avoid this?

Nextcloud 18.0.2(It has been occurring for a long time.), PHP 7.3.15, nginx 1.16.1, MariaDB 10.2.31, Redis 5.0.7