Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
181 views
in Technique[技术] by (71.8m points)

Passport laravel createToken Personal access client not found

After setup of passport, I have configured and created a controller to manage Register-Login- and - access to a resource for a general external post request. I do not need for a specific client. But when I try to create a token in the registration or in the login:

$tokenObj=$user->createToken('APPLICATION')->accessToken;

The error is:

RuntimeException: Personal access client not found. Please create one. in file C:xampp7.1htdocspassportvendorlaravelpassportsrcClientRepository.php on line 94 Stack trace: 1. RuntimeException->() C:xampp7.1htdocspassportvendorlaravelpassportsrcClientRepository.php:94 2. LaravelPassportClientRepository->personalAccessClient() C:xampp7.1htdocspassportvendorlaravelpassportsrcPersonalAccessTokenFactory.php:71

How can I solve it?

question from:https://stackoverflow.com/questions/55168808/passport-laravel-createtoken-personal-access-client-not-found

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You have to create access clients first. It is documented here. An access client it not the same than a user token, you can have one access client and many users with different passwords and tokens.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...