Support the ongoing development of Laravel.io →
Authentication Security Requests
Last updated 3 months ago.
0

Hi jimgwhit and thanks for your reply. Can you give an example of such a route in L5? I'm quite new to Laravel... Thanks again!

0

Solution for your problem :)

Route::get('/login', 'Auth\[email protected]');
Route::get('/register', 'Auth\[email protected]');
Last updated 7 years ago.
0

@stojankukrika is right.

If you are changing the login route, you should also check the "Authenticate" Middleware (line 43) and also change the route to which the user will be redirected when the session expires.

0

@stojankukrika, thanks for your example, it works but I made it a little shorter with following code:

/*
 * Authentication
 */
Route::controllers([
    'password' => 'Auth\PasswordController',
    '' => 'Auth\AuthController',
]);

Is this a good way to solve this problem?

It's kinda strange that this only works in this order though. When I put the AuthController above the PasswordController the latter no longer works, somebody knows why?

Last updated 7 years ago.
0

Because if you put it above the PasswordController, that route would catch all urls with the pattern /<anything> so /password would also enter the AuthController

Last updated 7 years ago.
0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

kore245 kore245 kore245 Joined 23 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.