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

Laravel Auth return different data

Sorry, anyone please help me. I use Laravel 5.4. I just wanna echo auth()-user()->role in view, but the result is different when I echo auth()->user()->role in controller. This is the code. if(!empty(auth()->user())){ echo…
0
votes
1 answer

Authentication Recommendation

I have a Laravel website with a table 'users' that stores the role_id, and a table 'companies' that stores custom permalinks. The default login routes are used for the users with the ADMIN role. I need to add other views and routes for the users…
Mihaela
  • 87
  • 1
  • 1
  • 6
0
votes
1 answer

Authenticated method in Laravel 6

I'm using Laravel 6. I want to generate a new API token for the user each time the user logged in. Referring to some answers on StackOverflow, there is a method authenticated in LoginController which is been called just after the user is logged in…
fahad shaikh
  • 593
  • 1
  • 14
  • 29
0
votes
0 answers

Multiple auth login does not redirect to the right link

I am enhancing a system with a user login present (for staffs) and I want to create another login instance for clients. So I have set up the guards and coded the rest as follows // config/auth.php return [ 'defaults' => [ 'guard' =>…
AndrewC
  • 13
  • 1
0
votes
1 answer

Laravel 6.2 Authentification Error : LoginController does not exist

I'm beginner in laravel framework so I don't understand lot of thing in laravel for the moment. So, I have try to create an simple authentication system. But when I try to use the form I have this error…
MrSolarius
  • 599
  • 11
  • 28
0
votes
2 answers

Laravel default authentication login request

I would like to ask about Laravel authentication that is generated using the command php artisan make:auth So if my application has the name "Myapp", and I want to make a request for a login using Postman and i'm developing the app on a local…
marmahan
  • 183
  • 2
  • 15
0
votes
1 answer

Add invitation functionality to Laravels authentication controller

I am using Laravels normal authentication functionality with RegisterController and the default views that are included. I have modified the RegisterController@create method to create a related model called Home to the User. Although a Home can have…
rebellion
  • 6,628
  • 11
  • 48
  • 79
0
votes
1 answer

Calling a model method as property and not a function

Started learning Laravel recently and came across a bit of code which caused me some headaches and need an explanation as to why that is so. Namely, I setup a basic laravel app, in my User model (standard model class) I created a method as such: …
lordZ3d
  • 540
  • 6
  • 20
0
votes
1 answer

How to create a custom password field for Laravel Auth

I need to login users registered in the table Igrejas that have the fields responsavel_cpf and responsavel_senha, but Laravel in the function validateCredentials expects the name 'password'. public function validateCredentials(UserContract $user,…
Diogo Machado
  • 396
  • 2
  • 11
0
votes
1 answer

Laravel - Auth::user data return null except Login Controller

I am creating user authentication using a custom table. In my login controller authentication is working fine and redirected to dashboard. But when I am going to create another url using a new controller, user auth data not showing for that…
Souvik Das
  • 49
  • 2
  • 10
0
votes
2 answers

Authentication redirect route

can you help me how to create if isadmin is true it will be redirected to admin page, else home page. AuthController public function postLogin(Request $request){ if(!auth()->attempt(['email' => $request->email, 'password' =>…
Lee wayy
  • 73
  • 1
  • 11
0
votes
1 answer

How to get the token value in the DB for notifications in Laravel

I am trying to get the token from ConfirmUserToken and attach it to the URL in the notification. I am trying to create a custom validation in laravel. When I used $notifiable->token, it gives me no result. How can I access the…
user5405921
0
votes
1 answer

Laravel Auth, Passing user credentials to Notification Class after registering

I am trying to pass User details to my notification so I can say: Dear User name, but couldnt figure it how. Also, I am looking forward to getting the default URL when verifying the user. So, basically I only wanted to change the first ->line() in…
0
votes
0 answers

How to authenticate in Laravel and redirect to the respective domain

I developed a multi-tenant database schema. Each subdomain connects to its respective database. Each schema has, for example, its own user table, therefore, when the user accesses the url of his own subdomain, Laravel authentication uses respective…
Magno Alberto
  • 628
  • 14
  • 27
0
votes
1 answer

Laravel Registration without Password

i'm new to Laravel and haven't worked out every detail of how it works though I'm looking for some help to implement an authentication workflow where a user can register without setting a password. Once the user clicks to verify their email they…