cartalyst / sentinel

A framework agnostic authentication & authorization system.
BSD 3-Clause "New" or "Revised" License
1.51k stars 238 forks source link

i cant use middleware auth or guest inside of my routes #551

Closed christmex closed 3 years ago

christmex commented 3 years ago

Your Environment

hi FOA i want to say sorry for my English, so i just want to ask , is that normal when i use sentinel i cant use auth middleware inside my routes ? thank you so much

brunogaspar commented 3 years ago

Hello @christmex

Do you have any simple example that shows this behaviour?

christmex commented 3 years ago

Hello @christmex

Do you have any simple example that shows this behaviour?

hi thx for repling my issue, my code look like this (Controller for login with sentinel) `$credentials = [ 'email' => $request->email, 'password' => $request->password, 'remember' => $remember ];

    $auth = Sentinel::authenticate($credentials);`

routes Route::group(['middleware' => 'auth'], function(){ Route::livewire('/roles', 'roles.index')->name('roles'); Route::get('/logout','SystemController@logout'); });

so when I use sentinel when I want to access route inside of auth middleware, I still cant access them, why? cuz when I check the session, there is no session, but I success to login with sentinel, but sentinel cant start session, its that normal? I hope u get it, thank you,

brunogaspar commented 3 years ago

The only things i can think at the moment:

Without good reproducible steps, can't really help much, sorry.