1

Important

I have tried many answers right here published but no one worked for me.

I have installed a fresh copy of Laravel 5.8 including the scaffolding about authentication with:

php artisan make:auth

After that in my localhost redirecting works fine when the users register with name, email, password, and password confirm.

Nevertheless when I upload it to my shared hosting:

I can:

  • Access to register form
  • Register a new user
  • Redirect to login form

But it fails when:

  • I try to login in with my email and password it only reloads the window of the browser and stays in the same page (login form)

This is strange for me because:

  • Works fine in localhost
  • No errors 500
  • The network tab only shows a 200 code status
  • Laravel log is empty

I have tried with:

protected $redirectTo = "home"; 

But anything happens, only the same behavior

I need to say that:

  • No roles
  • No third packages only the basic authetication system
Ali
  • 1,525
  • 1
  • 16
  • 27

1 Answers1

0

You mention when I upload it to my shared hosting - Laravel requires some setup/installation, simply uploading is not enough. Specifically you need to set permissions on several directories. Without correct permissions, your web server cannot create session files. If it can't create session files, logins will fail - and that's exactly what you are seeing.

Update: fixed Laravel 7 link for Laravel 5.8

Don't Panic
  • 13,965
  • 5
  • 32
  • 51