Make all front-end routes require authentication
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Make all front-end routes require authentication
Can anybody, please, give me good way how to do it ?
I edited this file /var/www/schmuck/config/shop.php
But I also need to remove /shop from url, so it must work with /. I couldn't combine it(
I edited this file /var/www/schmuck/config/shop.php
Code: Select all
'default' => ['prefix' => 'shop', 'middleware' => ['web', 'auth']],
Re: Make all front-end routes require authentication
Remove the "prefix" or set it to "/"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Re: Make all front-end routes require authentication
Great thank you, but in the file /var/www/schmuck/config/shop.php I have the following content:
When I go to / it redirects me to /login and the I have error:
ERR_TOO_MANY_REDIRECTS
if I comment this code then login page works
The routes/web.php file consists only
Please, help me to solve it
Code: Select all
'default' => ['prefix' => '/', 'middleware' => ['web', 'auth']],
ERR_TOO_MANY_REDIRECTS
if I comment this code
Code: Select all
'default' => ['prefix' => '/', 'middleware' => ['web', 'auth']],
The routes/web.php file consists only
Code: Select all
Auth::routes();
Re: Make all front-end routes require authentication
The order of the routes is wrong because the Auth routes are after the Aimeos routes if you execute
We haven't found a way yet to move the Auth routes up to the front ...
Code: Select all
./artisan route:list
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Make all front-end routes require authentication
You can try to add "Auth::routes();" routes in ./routes/web.php first and overwrite the Aimeos tree and detail routes afterwards:
Code: Select all
| | GET|POST|HEAD | shop/{d_name}/{d_pos?}/{d_prodid?} | aimeos_shop_detail | Aimeos\Shop\Controller\CatalogController@detailAction | web |
| | GET|POST|HEAD | shop/{f_name}~{f_catid} | aimeos_shop_tree | Aimeos\Shop\Controller\CatalogController@treeAction | web |
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star