Questions tagged [laravel-guard]

24 questions
0
votes
1 answer

Calling the right guard in middleware for Multi-auth system

I am adding a custom authentication system via guards , models and providers. After trying to read some documentation and articles, I am bit confused about the different way of invoking guards and middleware Question 1: So, if I want to invoke…
0
votes
1 answer

Laravel 8 Multi Auth Guard using Fortify but unable to implement Forgot Password and Verify Email for Admin

I implemented Fortify Multi Auth Guard (Admin and User) with Custom view. I have separate login view for admin and user. I have also implemented Forgot Password for user and it is working very well. I am just unable to implement Forgot Password for…
Johnny
  • 21
  • 3
0
votes
1 answer

Why does custom guard get logged out on page reload/redirect?

I created a new guard for logging in custom type of users. I can login users with Auth::attempt('webguest'), but login does not persist over page reloads. It works only when I use web-guard. See for example my two test routes: Route::get('test1',…
0
votes
1 answer

How can i submit form using name route when i am logged in with admin guard?

im using multiple authentication using guards and i stuck with routing of resource Controller I have two Different Controllers with same name in different namespaces Route::namespace('Admin')->prefix('admin')->group(function(){ …
0
votes
1 answer

Laravel loginUsingId() didnt remeber the login state on new page

I am trying to integrate Socialite in my laravel web app. When I am trying to login with FB ID using loginUsingId() it makes user login and redirect to homepage as expected, but when I visited some other page on the same domain it forgets that the…
0
votes
2 answers

Laravel 5.8 Multiple middlewares using guards and specific options for each guard

I have a laravel application that allows both admins and customers to gain access to it and for each one of them will have specific permissions using 2 separated tables for each type of user to auth and 2 different guards. what I need now is to give…
0
votes
2 answers

Laravel get user id in unprotected route

I am using Laravel guard to to protect routes, now I want to get user id in unprotected (common) routes, for example: Protected: /Profile Unprotected: /Search I able to get user id in protected routes, for example ProfileController.php, like…
Jack The Baker
  • 1,781
  • 1
  • 20
  • 51
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
-1
votes
1 answer

Laravel authentication with google is not working with guard

I have been working with a Laravel project with multiple guard authentications. one of my guard name is 'customer'. Only customers are allowed to login with their Google Account. Previously I was using Laravel default Users Model as Customer account…
1
2