Questions tagged [laravel-authentication]

Laravel ships with several pre-built authentication controllers for user registration, authentication, and password reset.

Laravel ships with several pre-built authentication controllers for user registration, authentication, and password reset.

376 questions
0
votes
0 answers

auth:user show blank in moduls controller laravel

I'm working on custom modules in laravel and getting unable to access print_r(Auth::user()); it show me blank. my route is inside modules Route::group(['module' => 'ScreenColors', 'middleware' => ['web'], 'namespace' =>…
0
votes
1 answer

remove validation from email parameter in laravel 5.6. I am using authenticate() method

I am trying to authenticate the using using ajax and laravel 5.6 authenticate() method. If I pass 'email' and 'password' parameters then it works fine but If I change the email parameter to user_email then it gives me validation that "Email field is…
Ahmar Arshad
  • 477
  • 1
  • 10
  • 22
0
votes
4 answers

Laravel 5.5: how to stop redirect to previous page after login

I am using Laravel default authentication When user loges in I redirect him/her to /dashboard instead of /home changing this line in RedirectIfAuthenticated return redirect('/home);` to return redirect('/dashboard'); now the if user hits another…
Junaid Masood
  • 658
  • 11
  • 20
0
votes
0 answers

Class Frontend\Auth\LoginController does not exist

I started to upgrade a Laravel project form v5.2 to v5.6. I followed the doc and made the changes listed there. now the composer update is working for 5.6 version. On the project the Authintication was managed via Sentry and i planned to replace…
nasirkhan
  • 9,948
  • 5
  • 27
  • 33
0
votes
2 answers

Laravel auth optional field?

In laravel auth registercontroller.php protected function create(array $data) { return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), …
Tera
  • 121
  • 3
  • 12
0
votes
2 answers

How to add user_id to login parameter in Laravel?

Below is some method in a trait AuthenticatesUsers where Illuminate\Foundation\Auth, Laravel. ... protected function validateLogin(Request $request) { $this->validate($request, [ $this->username() =>…
JsWizard
  • 1,663
  • 3
  • 21
  • 48
0
votes
1 answer

Laravel 5.6 error "function name must be a string" with builtin Auth

Im trying to modified the builtin laravel Auth to take in more attribute, but have encountered the error "function name must be a string". I didnt know what i did wrong. Here's my create method: protected function create(array $data) { …
m5kev4n
  • 541
  • 1
  • 8
  • 20
0
votes
1 answer

Laravel 5.5 how to modify login process to use existant db User Table (SQL Server)

I am a begginer in Laravel. Sorry for any stupid question. My scenario it the following: There is a previous db in Sql Server with a user table. This table is called USUARIO_EMITENTE. This table has a key field called 'user' and a 'password' field…
0
votes
1 answer

laravel authentication in restapi

My code is given below. I am facing problem. When I want check by username and password. password change every time. so I am unable to give result by email password. public function login() { $data = Input::all(); print_r($data); …
0
votes
3 answers

How do I display errors on login modal form when a user enters invalid credentials in Laravel 5.6?

In Laravel 5.6 I am using it's default authentication feature. However I have implemented a modal to replace the default login form. I am trying to keep a login modal form open and display errors upon failed login attempt. My login modal form looks…
0
votes
0 answers

Laravel: redirecTo() method is not working correctly

I have been trying to redirect a user after login, users are to be redirected to when a certain condition is fulfilled. In the LoginController provided by Laravel line 31->protected function redirectTo(Request $request){ …
0
votes
1 answer

How to use Laravel's 5.6 native Auth functionality with MongoDB

I am using the first-time laravel, and want to use the laravel Auth for login and registration, MongoDB as backend. Using this command enables the laravel Auth php artisan make:auth will it work ? can anyone help me, how to do it..
Amalendu Kar
  • 458
  • 1
  • 6
  • 17
0
votes
0 answers

Auth::user() can't be read after loading a different blade.php

so I have a web project, and after I logged in, this is what it looks like. This is the ui for admin.blade.php as you can notice, at the upper right corner, the username is displayed, but when I click the drop down menu, to add a job vacancy it…
eibersji
  • 1,218
  • 4
  • 29
  • 52
-1
votes
3 answers

laravel Middleware has no redirect on route dash board

i am trying to make authentication of laravel with middleware but my middleware not working to redicrect to admin/dashboard page my code below have data in data base that roll_as is 1 and i trying to login as admin but when i give input of login…
-1
votes
1 answer

Check Laravel Bouncer user roles and permissions to determine if able to login

I'm using standard Laravel authentication and I've added the Joseph Silber Bouncer package to setup roles and abilities. On the login process I would like to check if the user has a specific role or ability. I suspect I can do this…