Add an Authentication Provider
aocneanu opened this issue ยท 5 comments
Right now the default's Laravel authentication is overwritten, and that's not clean.
We need to implement an Enso Auth Provider.
As we need AD login I was looking to override attemptLogin
in the app's loginController; however it seems that the vendor controller is actually overriding the app's controller? Or am I doing something wrong? ๐
You need to overwrite also the auth routes. Add you own routes in api.php.
Thanks ๐
I'm amazed at how simple things can be with Laravel... but you have to know where to look
for anyone stumbling upon this, in routes/api.php
add the following (copied from vendor/laravel-enso/core/src/routes/api.php
):
Route::namespace('Auth')
->middleware('web')
->group(function () {
Route::post('login', 'LoginController@login')
->name('login');
Route::post('logout', 'LoginController@logout')
->name('logout');
Route::post('password/email', 'ForgotPasswordController@sendResetLinkEmail')
->name('password.email');
Route::post('password/reset', 'ResetPasswordController@reset')
->name('password.reset');
I'm amazed at how simple things can be with Laravel... but you have to know where to look
I second that
Resolved this with the new auth system that can be overwritten.