Answer the question
In order to leave comments, you need to log in
What is the algorithm for registering new users in Laravel Passport?
I am writing a web service with a separate back-end on Laravel. I set up Passport, implemented authorization, everything is more or less ok. But with the registration of new users it is not very clear what to do. There are two options:
1) In the post request I send the data of a new user, on the server I enter them into the users table, in the response I issue a token created in this way:
$token = $user->createToken('Token Name')->accessToken;
. A new user is registered in this way, but there is a problem: the expiration date of this token is not known, as in the case of the response from the request to /oauth/token . Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question