Answer the question
In order to leave comments, you need to log in
How to implement authorization by email password in laravel passport?
Hello everyone, I can’t figure out how to authorize a user only by email and password and give him access tokens?
In the documentation, you need to transfer a special key. But this is not included in the concept of the application and you need to log in only by email and password. How to do it? All that I found in Google is an implicit method. But it is not clear what and how should happen
Answer the question
In order to leave comments, you need to log in
In the documentation you need to transfer a special key
auth()->once($credentials);
$token = auth()->user()->createToken('Token Name')->accessToken;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question