Installed Laravel Breeze that includes login, registration, password reset etc. In my local dev everything works fine, but on production I cannot get past the login page. After submitting the login form I get redirected back to the login page. Looks like the session is not working properly, but there is a row in the database table sessions for every new user login though. Also tried different session drivers but the issue is still the same. Would appreciate every tip.
@jlrdw The code is the same as in Laravel Breeze starter kit, I didnt write any custom code Im just using the starter kit for now. I cannot see any Middleware classes in app/Http folder, but I have the RedirectIfAuthenticated.php middleware in vendor folder.
I have noticed that in some situations, the cookies are not pruned from the browser. Then for each new login, the application adds new cookies and you can have such a way 20 or 30 cookies.
I don't have identified what can cause this.
But the solution is to remove manually the cookies from the browser (via the devtools).
@vincent15000 I checked the cookies in browser before, there are always only two. One laravel_session and one CSRF token. Dont think this is my situation.
Also tried to change the session settings in .env file in many ways.
So I made it working today. Recreated new laravel project with composer install with breeze on production and the login session is working as it should. Changing DB_CONNECTION to sqlite instead of mysql in .env is what fixed the login bug which creates another problem but can take it from here haha
@vincent15000 yes the database tables were set to MyISAM engine and utf8mb3 charset by default, while I needed it to be InnoDB engine and utf8mb4 charset, fixed that and now the login works with mysql database correctly.