Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Passport Key path oauth-public.key does not exist or is not readable

Laravel passport showing this while trying to access resource

Key path "file://C:\xampp\htdocs\rental_5.0\storage\oauth-public.key" does not exist or is not readable
like image 406
Sabri Aziri Avatar asked Sep 09 '16 15:09

Sabri Aziri


2 Answers

You do not mention your installation steps. Presume you did the following:

composer require laravel/passport

Register the service provider inside config/app.php

Laravel\Passport\PassportServiceProvider::class,

Run the migrations

php artisan migrate

Lastly generate the keys using

php artisan passport:install

I see you are trying it on Windows. I saw an OpenSSL problem on Windows, might help you.

like image 118
Leon Vismer Avatar answered Nov 03 '22 10:11

Leon Vismer


This is because you didn't generate Oauth keys using passport keys.

Run

php artisan passport:keys

After that run the following command to generate a personal access client

php artisan passport:client --personal

Enter the details it asks you. Then you are done.

like image 50
Nelson Katale Avatar answered Nov 03 '22 11:11

Nelson Katale