MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Laravel Passport Trying to get property ‘secret’ of non-object

Uncategorized

THIS IS FOR LARAVEL 8 AND LARAVEL/PASSPORT

The first thing is to run the php artisan passport:install.

Inside your database table oauth_clients, under column name, look for Laravel Personal Access Client.

Copy the secret beside Laravel Personal Access Client.

Open AuthServiceProvider, then paste the secret inside the boot method where the CLIENT_SECRET is below:

Passport::personalAccessClientSecret(config('CLIENT_SECRET'));

And don’t forget to also add the ID of the secret from your database.

Passport::personalAccessClientId(config('ID'));

Use the quote along with the ID and CLIENT_SECRET as config() is expected to get a string.

Now is solved this error

dharmendra K
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x