Error with Passport plug in Heroku

Asked

Viewed 119 times

0

I have deployed an application to Heroku and am getting the following error

"message": "Key path "file://app/Storage/oauth-private.key " does not exist or is not readable", "Exception": "Logicexception", "file": "/app/vendor/League/Oauth2-server/src/Cryptkey.php", "line": 48, "trace": [ { "file": "/app/vendor/Laravel/Passport/src/Passportserviceprovider.php", "line": 242, "Function": "__Construct", "class": "League Oauth2 Server Cryptkey", "type": "->" },

Locally it works well, but after deploy when doing a user login that exists in the database was to be returned the access token but is returning this error. I searched in other sources and tested some dirt, some solved for now but when atulaizar the application and perform the debug the error returns.

1 answer

0

You didn’t mention your code, nor the steps you used to deploy. You can try it:

Composer require Laravel/Passport

Register config/app.php:

Laravel Passport Passportserviceprovider::class,

Run Migrations:

php Artisan migrate

Finally generate the Keys

php Artisan Passport:install

You can access Heroku documentation as well: https://devcenter.heroku.com/articles/oauth

Browser other questions tagged

You are not signed in. Login or sign up in order to post.