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
1 answer

What does laravel means by drivers in its authentication module?

1)Laravel has a very good built in authentication system/module.I had read its documentation the confusion to me is what is definition of a driver in guard and provider? 2)Is defining a new guard means defining a new driver?
0
votes
0 answers

How can prevent Login after Register, outside of laravel vendor files?

I want to prevent login after registration & I know its very easy & simple. By commenting single line we can do that. But my concern is I don't want to do this in Vendor's file. public function register(Request $request) { …
Shivam Verma
  • 905
  • 1
  • 8
  • 20
0
votes
0 answers

laravel 6 authenticate through api

I'm using Laravel to create an API. Then I want another Laravel instance to authenticate users using the api. So my api contains all the users. The client doesn't know anything. I want to have a form (just username and password) and send that data…
user936965
0
votes
1 answer

Show different http error pages if user is authenticated in laravel 6

I am writing an app that has a control panel. I would like to keep the control panel's chrome in the 404 and 403 pages provided the user is logged in. However Auth::user() and auth()->id() always return null in app/Exceptions/Handler.php and…
kaan_a
  • 3,503
  • 1
  • 28
  • 52
0
votes
0 answers

redirect back to job_seeker.register

im new to laravel 5.8 im trying to set up a multiple auth but after i register a new job_seeker it suppose to redirect me to job_seeker.profile instead it redirect me back to job_seeker.register i try some code in stackoverflow but nothing…
Moussa Eloifi
  • 15
  • 1
  • 7
0
votes
1 answer

Laravel test passes auth middleware but fails Auth::user() with data providers

I am testing my Laravel application with the integrated PHPUnit configuration and I have problems with the authentication of a user inside a test. I have this test (shortened) public function testShowEditForm($user, $expectedStatus,…
DSharp
  • 58
  • 1
  • 5
0
votes
1 answer

How can I login on Flutter app with Laravel basic authenticaiton using email and password

After creating a new Laravel project, what I did was only making authentication using php artisan make:auth. I needed to get CSRF token to log in on the Flutter app, so I simple commented out CSRF token in the middleware. The error I am getting is…
jay jay
  • 25
  • 5
0
votes
0 answers

Laravel Remember me cookie not being set on browser

I am performing the function of remember user login in the browser, I use the default Authentication of laravel, after "remember me checkbox" checked in the login form it will generate remember tokens in the database, but when I turned off the…
colinmorgan
  • 55
  • 1
  • 6
0
votes
1 answer

Not expired Laravel passport token

I'm developing standard Laravel REST API. I'm following the Laravel 5.4 API Authentication (Passport) Documentation. What I need is, User should log in through API and get access token which will not be expired. oauth_access_tokens table has the…
0
votes
0 answers

How can I check if the logged in user has a "1" on the admin column in Laravel 5?

I'm wanting to only show links if the logged in user has a "1" on the admin column from the users table. What I've tried: In my User.php public function isAdmin(){ if(Auth::User()->administrator == 1){ return true; }else{ …
0
votes
1 answer

Laravel 5 Illuminate\Auth\SessionGuard::login() error

Argument 1 passed to Illuminate\Auth\SessionGuard::login() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of Illuminate\Http\RedirectResponse I have my Register controller that checks if a membership id exists in a…
0
votes
0 answers

logout function for different users in laravel 5.8?

I have laravel application with multiple users. All of the users can login with different roles. For example, as a seller or Buyer. But when logged in as both and try to log out as a seller, then buyer automatically gets logged out. I think this is…
user8747057
0
votes
1 answer

How to authenticate and logging in user in laravel using guard?

I'm trying to make authentication using guard in Laravel 5.8. Authentication is passed but somehow it's not logging in the user. public function login(Request $request) { $email = $request->email; $password = $request->password; $credentials…
Abaij
  • 853
  • 2
  • 18
  • 34
0
votes
0 answers

How to modify laravel 5.6 login behaviour? How to add more fields for logging along with email and password?

Laravel has 2 fields in its auth to help user login i.e email and password. I have added another field(hidden field) in the login blade to pass a random number along with a password and email. In my eloquentuserprovider.php i am grabbing…
0
votes
1 answer

How to change password?

I want to edit form update only address, email and password. How to change password? The old password is important. edit.blade.php
@csrf {{ method_field('PATCH') }}
user9975473