I was trying to use the this sdk , after setting up as explained in read me, i used it in my web route group for Stateful application as explained i put the guard in middleware as follows :
Route::group(['namespace' => 'App\Http\Controllers', 'middleware' => ['workspace', 'guard:auth0']], function () { Route::get('/import', "ImportController@show"); });
but this is not working, ending up in redirect loop
Hi @rajnarayan-pix 👋 Sorry for any confusion, but I think you misunderstood what the README was suggesting. That is not how the README suggested you should configure your routes.
Laravel Version
Laravel 9.x
SDK Version
SDK 7.6
PHP Version
PHP 8.3
What happened?
I was trying to use the this sdk , after setting up as explained in read me, i used it in my web route group for Stateful application as explained i put the guard in middleware as follows :
Route::group(['namespace' => 'App\Http\Controllers', 'middleware' => ['workspace', 'guard:auth0']], function () { Route::get('/import', "ImportController@show"); });
but this is not working, ending up in redirect loopafter seeing code examples i changed as follows :
Route::group(['namespace' => 'App\Http\Controllers', 'middleware' => ['workspace', 'auth0.authenticate']], function () { Route::get('/import', "ImportController@show"); });
and then it started working as expected
Please either change your read me, or else fix the behaviour to suit the read me :)
How can we reproduce this issue?
Just follow the read me and setup middleware in routes as follows :
Route::group(['namespace' => 'App\Http\Controllers', 'middleware' => ['workspace', 'guard:auth0']], function () { Route::get('/import', "ImportController@show"); });
Additional context
No response