0

The spark registration page shows up fine. I fill out the form, submit, and there is a new entry in the database.

Calling the function to get the current user :

$router->get('/user/current', 'Laravel\Spark\Http\Controllers\UserController@current');

With the controller ...

 /**
 * Get the current user of the appliation.
 *
 * @return Response
 */
public function current()
{
    return response()->json(Auth::check());
}

This Auth::check() returns false. And Auth::user() in this place returns nothing.

Logging in via the spark login page as that user has the same results.

However, going back to the login or registration pages reroutes me as if I am logged in. I can also poke around the spark settings pages and add new teams, etc.

Why does spark think I am logged in and why doesn't it actually log me in?

kenorb
  • 155,785
  • 88
  • 678
  • 743
Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50

1 Answers1

0

So, the problem was that the app has been using gulp to serve and build it. Now that the app is up and running and being served through the php artisan serve command, it is no longer accessible via the URL 192.168.10.10/... and it now called through localhost:8000/...

The problem was that calling the 192... did not produce an error so I didn't think to check that.

@Joshua

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743